Recent Releases of geoip2
geoip2 - 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.
- Python
Published by oschwald over 1 year ago
geoip2 - 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 ananycast 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.
- Python
Published by oschwald over 2 years ago
geoip2 - 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.
- Python
Published by oschwald about 4 years ago
geoip2 - 4.5.0
- 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 and Insights web services.
mobile_country_codeandmobile_network_codeattributes were added togeoip2.model.ISPfor the GeoIP2 ISP database andgeoip2.record.Traitsfor the Enterprise database and the GeoIP2 City and Insights web services. We expect this data to be available by late January, 2022.
- Python
Published by oschwald over 4 years ago
geoip2 - 4.3.0
- Previously, the
py.typedfile was not being added to the source distribution. It is now explicitly specified in the manifest. - The type hints for the database file in the
Readerconstructor have been expanded to match those specified bymaxmindb.open_database. In particular,os.PathLikeandIOhave been added. - Corrected the type hint for the
metadata()method onReader. It will return amaxminddb.extension.Metadataif the C extension is being used.
- Python
Published by oschwald almost 5 years ago
geoip2 - 4.0.0
- IMPORTANT: Python 2.7 and 3.5 support has been dropped. Python 3.6 or greater is required.
- Asyncio support has been added for web service requests. To make async
requests, use
geoip.webservice.AsyncClient. geoip.webservice.Clientnow provides aclose()method and associated context managers to be used inwithstatements.- Type hints have been added.
- The attributes
postal_codeandpostal_confidencehave been removed fromgeoip2.record.Location. These would previously always beNone. user_idis no longer supported as a named argument for the constructor ongeoip2.webservice.Client. Useaccount_idor a positional parameter instead.- For both
ClientandAsyncClientrequests, the default timeout is now 60 seconds.
- Python
Published by oschwald almost 6 years ago
geoip2 - 3.0.0
- BREAKING CHANGE: The
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. - The
networkattribute was added togeoip2.record.Traits,geoip2.model.AnonymousIP,geoip2.model.ASN,geoip2.model.ConnectionType,geoip2.model.Domain, andgeoip2.model.ISP. This is anipaddress.IPv4Networkor anipaddress.IPv6Network. This is the largest network where all of the fields besidesip_addresshave the same value. GitHub #79. - Python 3.3 and 3.4 are no longer supported.
- Updated documentation of anonymizer attributes -
is_anonymous_vpnandis_hosting_provider- to be more descriptive. - Added support for the
user_counttrait for the GeoIP2 Precision webservice. - Added the
static_ip_scoreattribute togeoip2.record.Traitsfor GeoIP2 Precision Insights. This is a float which indicates how static or dynamic an IP address is.
- Python
Published by oschwald over 6 years ago
geoip2 - 2.9.0
- You may now pass in the database via a file descriptor rather than a file
name when creating a new
geoip2.database.Readerobject usingMODE_FD. This will read the database from the file descriptor into memory. Pull request by nkinkade. GitHub #53.
- Python
Published by oschwald about 8 years ago
geoip2 - 2.4.2
- 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 module uses an integer for theuser_id, which will break with theserequestsversions. Theuser_idis now converted to bytes before being passed torequests.
- Python
Published by oschwald over 9 years ago
geoip2 - 2.4.0
- This module now uses
ipaddresson Python 2 rather thanipaddrto validate IP addresses before sending them to the web service. - Added handling of additional error codes that the web service may return.
- PEP 257 documentation fixes.
- Updated documentation to reflect that the accuracy radius is now included in City.
- Previously, the source distribution was missing some tests and test databases. This has been corrected. Reported by Lumir Balhar.
- Python
Published by oschwald about 10 years ago
geoip2 - 2.3.0: Enterprise Support. Context Manager Support.
- Added support for the GeoIP2 Enterprise database.
geoip2.database.Readernow supports being used in awithstatement (PEP 343). (PR from Nguyễn Hồng Quân. GitHub #29)
- Python
Published by oschwald about 10 years ago
geoip2 - 2.2.0 New Demographics Fields and Anonymous Deprecations
- The
geoip2.records.Locationclass has been updated to add attributes for theaverage_incomeandpopulation_densityfields provided by the Insights web service. - The
is_anonymous_proxyandis_satellite_providerproperties ongeoip2.records.Traits` have been deprecated. Please use our GeoIP2 Anonymous IP database to determine whether an IP address is used by an anonymizing service.
- Python
Published by 2shortplanks about 11 years ago
geoip2 - 2.1.0: New file and memory mode for database reader
- 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
mmapmodule, the file mode will be used by default. You can explicitly set the mode using themodekeyword argument with theMODE_AUTO,MODE_MMAP,MODE_MMAP_EXT,MODE_FILE, andMODE_MEMORYconstants exported bygeoip2.database.
- Python
Published by oschwald over 11 years ago
geoip2 - 2.0.2
- Added support for the GeoIP2 Anonymous IP database. The
geoip2.database.Readerclass now has ananonymous_ip()method which returns ageoip2.models.AnonymousIPobject. - Added
__repr__and__eq__methods to the model and record classes to aid in debugging and using the library from a REPL.
- Python
Published by oschwald over 11 years ago
geoip2 - 0.7.0
- BREAKING CHANGES:
- The deprecated
city_isp_org()andomni()methods have been removed. - The
geoip2.database.Readerlookup methods (e.g.,city(),isp()) now raise aTypeErrorif they are used with a database that does not match the method. In particular, doing acity()lookup on a GeoIP2 Country database will result in an error and vice versa.
- The deprecated
- A
metadata()method has been added to thegeoip2.database.Readerclass. This returns amaxminddb.reader.Metadataobject with information about the database.
- Python
Published by oschwald almost 12 years ago
geoip2 - 0.6.0
- The web service client API has been updated for the v2.1 release of the web
service. In particular, the
city_isp_organdomnimethods ongeoip2.webservice.Clientshould be considered deprecated. Thecitymethod now provides all of the data formerly provided bycity_isp_org, and theomnimethod has been replaced by theinsightsmethod. Note: In v2.1 of the web service,accuracy_radius,autonomous_system_number, and all of theconfidencevalues were changed from unicode to integers. This may affect how you use these values from this API. - Support was added for the GeoIP2 Connection Type, Domain, and ISP databases.
- Python
Published by oschwald almost 12 years ago
geoip2 - 0.4.1: Fixed Installation Issue
- Read in
README.rstas UTF-8 insetup.py.
- Python
Published by oschwald over 12 years ago
geoip2 - 0.4.0: Reader/Client Constructor API Change
- API CHANGE: Changed the
languageskeyword argument tolocaleson the constructors forgeoip.webservice.Clientandgeoip.database.Reader.
- Python
Published by oschwald over 12 years ago
geoip2 - 0.3.0: API Change
- IMPORTANT:
geoip.webserviceswas renamedgeoip.webserviceas it contains only one class. - Added GeoIP2 database reader using maxminddb. This does not work with PyPy as it relies on a C extension.
- Added more specific exceptions for web service client.
- Python
Published by oschwald over 12 years ago
geoip2 - 0.1.1 Alpha
- Documentation and packaging updates
- Python
Published by oschwald almost 13 years ago
geoip2 - 0.2.0 Alpha
- Support for Python 3.2 was dropped.
- The methods to call the web service on the
Clientobject now validate the IP addresses before calling the web service. This requires theipaddrmodule on Python 2.x. - We now support more languages. The new languages are de, es, fr, and pt-BR.
- The REST API now returns a record with data about your account. There is a new geoip.records.MaxMind class for this data.
- Rename model.continent.continent_code to model.continent.code.
- Documentation updates.
- Python
Published by oschwald almost 13 years ago
geoip2 - 0.2.1 Beta
- First official beta release.
- Documentation updates and corrections.
- Python
Published by oschwald almost 13 years ago
geoip2 - 0.2.2 Beta
- Fixed a bug in the model objects that prevented
longitudeandmetro_codefrom being used.
- Python
Published by oschwald almost 13 years ago