Repository navigation
Releases
Releases · maxmind/GeoIP2-python
5.4.0
- The minimum version of
maxminddbis now 3.3.0. This version raises
InvalidDatabaseErrorfor more kinds of corrupt databases, and it fixes
memory-safety and free-threading bugs in the C extension. It also lets
geoip2.database.Readeropen a binary file object withMODE_AUTO. See
themaxminddb 3.3.0 release notes <https://github.com/maxmind/MaxMind-DB-Reader-python/releases/tag/v3.3.0>_. - The type hint for the
fileishargument ofgeoip2.database.Readeris
nowmaxminddb.types.DatabaseSource. WithMODE_FDorMODE_AUTO,
it accepts any object whoseread()method returnsbytes, such as a
gzip.GzipFile. It no longer accepts a text file object, which never
worked.
5.3.0
- The version is now retrieved from package metadata at runtime using
importlib.metadata. This reduces the chance of version inconsistencies
during releases. - The async client now builds its
Authorizationheader with
aiohttp.encode_basic_auth()instead of theaiohttp.BasicAuth/
auth=parameter, which are deprecated as of aiohttp 3.14.0. As a result,
the minimum requiredaiohttpversion is now 3.14.0. - A new
residentialattribute has been added to
geoip2.records.Anonymizer. This is ageoip2.records.AnonymizerFeed
object providing residential proxy data for the network and contains the
following fields:confidence,network_last_seen, and
provider_name. This attribute may be populated even when no other
anonymizer attributes are set, so theanonymizerobject may now
contain only this attribute.
5.2.0
- IMPORTANT: Python 3.10 or greater is required. If you are using an older
version, please use an earlier release. maxminddbhas been upgraded to 3.0.0. This includes free-threading
support.- Setuptools has been replaced with the uv build backend for building the
package. - A new
anonymizerobject has been added togeoip2.models.Insights.
This object is ageoip2.records.Anonymizerand contains the following
fields:confidence,network_last_seen,provider_name,
is_anonymous,is_anonymous_vpn,is_hosting_provider,
is_public_proxy,is_residential_proxy, andis_tor_exit_node.
These provide information about VPN and proxy usage. - A new
ip_risk_snapshotproperty has been added to
geoip2.records.Traits. This is a float ranging from 0.01 to 99 that
represents the risk associated with the IP address. A higher score indicates
a higher risk. This field is only available from the Insights end point. - The following properties on
geoip2.records.Traitshave been deprecated:
is_anonymous,is_anonymous_vpn,is_hosting_provider,
is_public_proxy,is_residential_proxy, andis_tor_exit_node.
Please use theanonymizerobject in theInsightsmodel instead.
5.1.0
5.0.1
5.0.0
- BREAKING: The
rawattribute on the model classes has been replaced
with ato_dict()method. This can be used to get a representation of
the object that is suitable for serialization. - BREAKING: The
ip_addressproperty on the model classes now always returns
aipaddress.IPv4Addressoripaddress.IPv6Address. - BREAKING: The model and record classes now require all arguments other than
localesandip_addressto be keyword arguments. - BREAKING:
geoip2.mixinshas been made internal. This normally would not
have been used by external code. - IMPORTANT: Python 3.9 or greater is required. If you are using an older
version, please use an earlier release. metro_codeongeoip2.record.Locationhas been deprecated. The
code values are no longer being maintained.- The type hinting for the optional
localeskeyword argument now allows
any sequence of strings rather than only list of strings.
4.8.1
4.8.0
- IMPORTANT: Python 3.8 or greater is required. If you are using an older
version, please use an earlier release. - The
is_anycastattribute was added togeoip2.record.Traits.
This returnsTrueif 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.
4.7.0
4.6.0
- The
AddressNotFoundErrorclass now has anip_addressattribute
with the lookup address andnetworkproperty 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.