NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1034 most downloaded on PyPI
MaxMind GeoIP API
Last release 2 months ago
16 Jul 2026
Ships fairly regularly
a new release about every 7 months
Nearly every release is documented
notes for 45 of 45 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
45 releases · first in 2013
…aiohttp.BasicAuth / auth= parameter, which are deprecated as of aiohttp 3.14.0. As a result, the minimum required aiohttp version is now 3.14.0.
importlib.metadata. This reduces the chance of version inconsistenciesAuthorization header withaiohttp.encode_basic_auth() instead of the aiohttp.BasicAuth /auth= parameter, which are deprecated as of aiohttp 3.14.0. As a result,aiohttp version is now 3.14.0.residential attribute has been added togeoip2.records.Anonymizer. This is a geoip2.records.AnonymizerFeedconfidence, network_last_seen, andprovider_name. This attribute may be populated even when no otheranonymizer object may nowOne column per quarter.
The following properties on geoip2.records.Traits have been deprecated: is_anonymous , is_anonymous_vpn , is_hosting_provider , is_public_proxy , is_r…
maxminddb has been upgraded to 3.0.0. This includes free-threadinganonymizer object has been added to geoip2.models.Insights.geoip2.records.Anonymizer and contains the followingconfidence, network_last_seen, provider_name,is_anonymous, is_anonymous_vpn, is_hosting_provider,is_public_proxy, is_residential_proxy, and is_tor_exit_node.ip_risk_snapshot property has been added togeoip2.records.Traits. This is a float ranging from 0.01 to 99 thatgeoip2.records.Traits have been deprecated:is_anonymous, is_anonymous_vpn, is_hosting_provider,is_public_proxy, is_residential_proxy, and is_tor_exit_node.anonymizer object in the Insights model instead.Support for the GeoIP Anonymous Plus database has been added. To do a lookup in this database, use the anonymous_plus method on Reader .
anonymous_plus method on Reader.Allow ip_address in the Traits record to be None again. The primary use case for this is from the minfraud package.
ip_address in the Traits record to be None again. Theminfraud package.metro_code on geoip2.record.Location has been deprecated. The code values are no longer being maintained.
raw attribute on the model classes has been replaced
with a to_dict() method. This can be used to get a representation of
the object that is suitable for serialization.ip_address property on the model classes now always returns
a ipaddress.IPv4Address or ipaddress.IPv6Address.locales and ip_address to be keyword arguments.geoip2.mixins has been made internal. This normally would not
have been used by external code.metro_code on geoip2.record.Location has been deprecated. The
code values are no longer being maintained.locales keyword argument now allows
any sequence of strings rather than only list of strings.setuptools was incorrectly listed as a runtime dependency. This has been removed. Pull request by Mathieu Dupuy. GitHub #174.
setuptools was incorrectly listed as a runtime dependency. This has
been removed. Pull request by Mathieu Dupuy. GitHub #174.IMPORTANT: Python 3.8 or greater is required. If you are using an older version, please use an earlier release.
is_anycast attribute was added to geoip2.record.Traits.
This returns True if the IP address belongs to an
anycast network <https://en.wikipedia.org/wiki/Anycast>_.
This is available for the GeoIP2 Country, City Plus, and Insights web services
and the GeoIP2 Country, City, and Enterprise databases.IMPORTANT: Python 3.7 or greater is required. If you are using an older version, please use an earlier release.
The AddressNotFoundError class now has an ip_address attribute with the lookup address and network property for the empty network in the database cont
AddressNotFoundError class now has an ip_address attribute
with the lookup address and network property for the empty network
in the database containing the IP address. These are only available
when using a database, not the web service. Pull request by illes.
GitHub #130.Support for mobile country code (MCC) and mobile network codes (MNC) was added for the GeoIP2 ISP and Enterprise databases as well as the GeoIP2 City
mobile_country_code andmobile_network_code attributes were added to geoip2.model.ISPgeoip2.record.Traits for theThe public API on geoip2.database is now explicitly defined by setting __all__.
geoip2.database is now explicitly defined by
setting __all__.metadata() method on Reader is now
maxminddb.reader.Metadata rather than a union type.Previously, the py.typed file was not being added to the source distribution. It is now explicitly specified in the manifest.
py.typed file was not being added to the source
distribution. It is now explicitly specified in the manifest.Reader constructor have
been expanded to match those specified by maxmindb.open_database. In
particular, os.PathLike and IO have been added.metadata() method on Reader. It
will return a maxminddb.extension.Metadata if the C extension is being
used.You may now set a proxy to use when making web service requests by passing the proxy parameter to the AsyncClient or Client constructor.
proxy parameter to the AsyncClient or Client constructor.Added the is_residential_proxy attribute to geoip2.model.AnonymousIP and geoip2.record.Traits.
is_residential_proxy attribute to geoip2.model.AnonymousIP
and geoip2.record.Traits.HTTPError now provides the decoded response content in the
decoded_content attribute. Requested by Oleg Serbokryl. GitHub #95.Added py.typed file per PEP 561. Reported by Árni Már Jónsson.
py.typed file per PEP 561. Reported by Árni Már Jónsson.Re-release to fix bad reStructuredText in README.md. No substantive changes.
README.md. No substantive
changes.BREAKING CHANGE: The geoip2.record.* classes have been refactored to improve performance. This refactoring may break classes that inherit from them. T…
geoip2.record.* classes have been refactored to
improve performance. This refactoring may break classes that inherit from
them. The public API should otherwise be compatible.network attribute was added to geoip2.record.Traits,
geoip2.model.AnonymousIP, geoip2.model.ASN,
geoip2.model.ConnectionType, geoip2.model.Domain,
and geoip2.model.ISP. This is an ipaddress.IPv4Network or an
ipaddress.IPv6Network. This is the largest network where all of the
fields besides ip_address have the same value. GitHub #79.is_anonymous_vpn and
is_hosting_provider - to be more descriptive.user_count trait for the GeoIP2 Precision webservice.static_ip_score attribute to geoip2.record.Traits for
GeoIP2 Precision Insights. This is a float which indicates how static or dynamic
an IP address is.You may now pass in the database via a file descriptor rather than a file name when creating a new geoip2.database.Reader object using MODE_FD. This w
geoip2.database.Reader object using MODE_FD.
This will read the database from the file descriptor into memory. Pull
request by nkinkade. GitHub #53.Python 2.6 support has been dropped. Python 2.7+ or 3.3+ is now required.
ACCOUNT_ID_REQUIRED AND ACCOUNT_ID_UNKNOWN error codes.The is_in_european_union attribute was added to geoip2.record.Country and geoip2.record.RepresentedCountry. This attribute is True if the country is a
is_in_european_union attribute was added to
geoip2.record.Country and geoip2.record.RepresentedCountry. This
attribute is True if the country is a member state of the European
Union.The following new anonymizer attributes were added to geoip2.record.Traits for use with GeoIP2 Precision Insights: is_anonymous, is_anonymous_vpn, is_
geoip2.record.Traits
for use with GeoIP2 Precision Insights: is_anonymous,
is_anonymous_vpn, is_hosting_provider, is_public_proxy, and
is_tor_exit_node.Added support for GeoLite2 ASN database.
Recent releases of requests (2.12.2 and 2.12.3) require that the username for basic authentication be a string or bytes. The documentation for this mo
requests (2.12.2 and 2.12.3) require that the
username for basic authentication be a string or bytes. The documentation
for this module uses an integer for the user_id, which will break with
these requests versions. The user_id is now converted to bytes
before being passed to requests.Updated documentation to clarify what the accuracy radius refers to.
setup.py.This module now uses ipaddress on Python 2 rather than ipaddr to validate IP addresses before sending them to the web service.
ipaddress on Python 2 rather than ipaddr to
validate IP addresses before sending them to the web service.Added support for the GeoIP2 Enterprise database.
geoip2.database.Reader now supports being used in a with statement
(PEP 343). (PR from Nguyễn Hồng Quân. GitHub #29)The is_anonymous_proxy and is_satellite_provider properties on geoip2.records.Traits` have been deprecated. Please use our GeoIP2 Anonymous IP databas…
geoip2.records.Location class has been updated to add attributes for the average_income and population_density fields provided by the Insights web service.is_anonymous_proxy and is_satellite_provider properties on
`geoip2.records.Traits`` have been deprecated. Please use our GeoIP2 Anonymous IP database to determine whether an IP address is used by an anonymizing service.The reader now supports pure Python file and memory modes. If you are not using the C extension and your Python does not provide the mmap module, the
mmap module,
the file mode will be used by default. You can explicitly set the mode using
the mode keyword argument with the MODE_AUTO, MODE_MMAP,
MODE_MMAP_EXT, MODE_FILE, and MODE_MEMORY constants exported by
geoip2.database.Added support for the GeoIP2 Anonymous IP database. The geoip2.database.Reader class now has an anonymous_ip() method which returns a geoip2.models.An
geoip2.database.Reader class now has an anonymous_ip() method which
returns a geoip2.models.AnonymousIP object.__repr__ and __eq__ methods to the model and record classes
to aid in debugging and using the library from a REPL.The constructor for geoip2.webservice.Client now takes an optional timeout parameter. (PR from arturro. GitHub #15)
geoip2.webservice.Client now takes an optional timeout parameter. (PR from arturro. GitHub #15)* First production release.
First production release.
The deprecated city_isp_org() and omni() methods have been removed.
city_isp_org() and omni() methods
have been removed.geoip2.database.Reader lookup methods (e.g., city(),
isp()) now raise a TypeError if they are used with a database that
does not match the method. In particular, doing a city() lookup on a
GeoIP2 Country database will result in an error and vice versa.metadata() method has been added to the geoip2.database.Reader
class. This returns a maxminddb.reader.Metadata object with information
about the database.In particular, the city_isp_org and omni methods on geoip2.webservice.Client should be considered deprecated. The city method now provides all of the…
city_isp_org and omni methods on
geoip2.webservice.Client should be considered deprecated. The city
method now provides all of the data formerly provided by city_isp_org,
and the omni method has been replaced by the insights method.
Note: In v2.1 of the web service, accuracy_radius,
autonomous_system_number, and all of the confidence values were
changed from unicode to integers. This may affect how you use these values
from this API.Switched to Apache 2.0 license.
Fixed missing import statements for geoip2.errors and geoip2.models. (Gustavo J. A. M. Carneiro)
Fixed missing import statements for geoip2.errors and geoip2.models. (Gustavo J. A. M. Carneiro)
Minor documentation and code cleanup
Added requirement for maxminddb v0.3.0, which includes a pure Python database reader. Removed the extras_require for maxminddb.
Added missing geoip2.models import to geoip.database.
geoip2.models import to geoip.database.Read in README.rst as UTF-8 in setup.py.
README.rst as UTF-8 in setup.py.API CHANGE: Changed the languages keyword argument to locales on the constructors for geoip.webservice.Client and geoip.database.Reader.
languages keyword argument to locales on the
constructors for geoip.webservice.Client and geoip.database.Reader.Fixed packaging issue with extras_require.
Fixed packaging issue with extras_require.
IMPORTANT: geoip.webservices was renamed geoip.webservice as it contains only one class.
geoip.webservices was renamed geoip.webservice as it
contains only one class.Fixed a bug in the model objects that prevented longitude and metro_code from being used.
longitude and metro_code from being used.Documentation updates and corrections.
Support for Python 3.2 was dropped.
Client object now validate the IP addresses before calling the web service. This requires the ipaddr module on Python 2.x.Documentation and packaging updates
* Initial release
Initial release
Your coding agent can read these notes before it upgrades. Set up the MCP server →