geoip2fast for Mac
GeoIP2Fast is the fastest GeoIP2 country/city/asn lookup library. A search takes less than 0.00003 seconds.
geoip2fast — overview
GeoIP2Fast v1.2.2
GeoIP2Fast is the fastest GeoIP2 country/city/asn lookup library. A search takes less than 0.00003 seconds. It has its own data file updated with Maxmind-Geolite2-CSV, supports IPv4 and IPv6, works on Python3, Pypy3 and is Pure Python!
With it´s own datafile (geoip2fast.dat.gz), can be loaded into memory in ~0.07 seconds and has a small footprint for all data, so you don´t need to make requests to any webservices or connect to an external database. And it works on Linux, Windows and MacOS!
And now you can download .dat.gz from your own application or via the command line. See more at Update your database automatically
GeoIP2Fast returns ASN NAME, COUNTRY ISO CODE, COUNTRY NAME, CITY NAME/STATE/DISTRICT and CIDR. There is no external dependencies, you just need the file and the desired data file . The lookup speed is the same for any data file.
Country and ASN databases with IPv4 and IPv6
City and ASN databases with IPv4 and IPv6
City databases are not included in the pip installation package, if you want to: download them manually from DAT Files LATEST Release or create them yourself using . City data already includes country data. or download using the new function GeoIP2Fast.update_all() read more below If you are using pypy3, the loading time will increase a little, but the speed will be a little faster and the memory footprint will be lower.
The new v1.2.X databases are not compatible with versions equal to or older than v1.1.X, and vice versa, obviously. The last version with support only for countries and ASN only is v1.1.X, which is still available with this command line: .
Installation
DAT files updates You can create your own dat.gz file using geoip2dat.py file. You can also download the latest dat files that are updated automatically on Tuesdays and Fridays And you can update the dat files downloading from our releases repository, via code or via command line.
How does it work?
GeoIP2Fast has 4 datafiles included. Tha main file is with support Country lookups and only IPv4. Usually, these files are located into the library directory (), but you can place it into the same directory of your application. The library automatically checks both paths, And the directory of your application overlaps the directory of the library. You can use an specific location also.
The function is used together with some ordered lists of integers to search the Network/CountryCode (Yes! an IP address has an integer representation, try to ping this number: or this ).
If GeoIP2Fast does not have a network IP address that was requested, a "not found in database" error will be returned. Unlike many other libraries that when not finding a requested network, gives you the geographical location of the network immediately below. The result is not always correct.
Data file updates are made available twice a week in our github releases. Files with City data and IPv6 support can also be downloaded there.
Details
GeoIP2 国家/ASN 查询工具
How to install geoip2fast
- Open Terminal (press ⌘ + Space and type “Terminal”).
- If Homebrew is not installed yet, run the command below first.
- Run this command:
Latest 10 releases
Last updated 2026-06-05; current version LATEST, with the latest 2 releases listed.
| Version | Released | Type | Size | macOS | Windows | Linux |
|---|---|---|---|---|---|---|
| LATEST | 2026-06-05 | Stable | — | — | — | — |
| LEGACY | 2026-06-05 | Stable | — | — | — | — |
Data from GitHub Releases; stable releases first, each group sorted newest first.
Prebuilt bottle platforms
Official Homebrew bottles cover:
- all
⚠️ No prebuilt bottle for Intel Macs; Intel users need brew install --build-from-source to build from source.
Compared with similar apps
Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.
| App | Version | License | Architecture | 30-day installs |
|---|---|---|---|---|
| geoip2fast | LATEST | MIT | CLI | 12 |
| asn1c | v0.9.29 | BSD-2-Clause | CLI | 17 |
| asn | v0.83.0 | MIT | CLI | 35 |
| wtfis | v0.15.0 | MIT | CLI | 75 |
Similar apps: Command-line Tools
asn1c
Compile ASN.1 specifications into C source codeasn
ASN Lookup Tool and Traceroute Serverwtfis
Passive hostname, domain and IP lookup tool for non-robotslibtasn1
libtasn1 is a low-level library for handling ASN.1 structures, primarily used to parse and…openssl@4
Cryptography and SSL/TLS Toolkitxz
General-purpose data compression with high compression ratioCategories: Command-line Tools