GeoIP2-python API reference
49 public APIs from GeoIP2-python (maxmind/GeoIP2-python) — 25 classes, 0 functions, 24 methods. Signatures extracted by static analysis of the actual source.
Repository: maxmind/GeoIP2-python
| Kind | Count |
|---|---|
| Classes | 25 |
| Functions | 0 |
| Methods | 24 |
API list
class
src.geoip2._internal.ModelShared methods for MaxMind model classes.
method
src.geoip2._internal.Model.to_dict() -> dict[str, Any]Return a dict of the object suitable for serialization.
class
src.geoip2.database.ReaderGeoIP database Reader object.
method
src.geoip2.database.Reader.anonymous_ip(ip_address:IPAddress) -> AnonymousIPGet the AnonymousIP object for the IP address.
method
src.geoip2.database.Reader.anonymous_plus(ip_address:IPAddress) -> AnonymousPlusGet the AnonymousPlus object for the IP address.
method
src.geoip2.database.Reader.asn(ip_address:IPAddress) -> ASNGet the ASN object for the IP address.
method
src.geoip2.database.Reader.city(ip_address:IPAddress) -> CityGet the City object for the IP address.
method
src.geoip2.database.Reader.close() -> NoneClose the GeoIP database.
method
src.geoip2.database.Reader.connection_type(ip_address:IPAddress) -> ConnectionTypeGet the ConnectionType object for the IP address.
method
src.geoip2.database.Reader.country(ip_address:IPAddress) -> CountryGet the Country object for the IP address.
method
src.geoip2.database.Reader.domain(ip_address:IPAddress) -> DomainGet the Domain object for the IP address.
method
src.geoip2.database.Reader.enterprise(ip_address:IPAddress) -> EnterpriseGet the Enterprise object for the IP address.
method
src.geoip2.database.Reader.isp(ip_address:IPAddress) -> ISPGet the ISP object for the IP address.
method
src.geoip2.database.Reader.metadata() -> maxminddb.reader.MetadataGet the metadata for the open database.
class
src.geoip2.errors.AddressNotFoundErrorThe address you were looking up was not found.
method
src.geoip2.errors.AddressNotFoundError.network() -> ipaddress.IPv4Network | ipaddress.IPv6Network | NoneThe network associated with the error.
class
src.geoip2.errors.AuthenticationErrorThere was a problem authenticating the request.
class
src.geoip2.errors.GeoIP2ErrorThere was a generic error in GeoIP2.
class
src.geoip2.errors.HTTPErrorThere was an error when making your HTTP request.
class
src.geoip2.errors.InvalidRequestErrorThe request was invalid.
class
src.geoip2.errors.OutOfQueriesErrorYour account is out of funds for the service queried.
class
src.geoip2.models.ASNModel class for the GeoLite ASN.
class
src.geoip2.models.AnonymousIPModel class for the GeoIP Anonymous IP.
class
src.geoip2.models.AnonymousPlusModel class for the GeoIP Anonymous Plus.
class
src.geoip2.models.CityModel for the City Plus web service and the City database.
class
src.geoip2.models.ConnectionTypeModel class for the GeoIP Connection-Type.
class
src.geoip2.models.CountryModel for the Country web service and Country database.
class
src.geoip2.models.DomainModel class for the GeoIP Domain.
class
src.geoip2.models.EnterpriseModel for the GeoIP Enterprise database.
class
src.geoip2.models.ISPModel class for the GeoIP ISP.
class
src.geoip2.models.InsightsModel for the GeoIP Insights web service.
class
src.geoip2.models.SimpleModelProvides basic methods for non-location models.
method
src.geoip2.models.SimpleModel.ip_address() -> IPv4Address | IPv6AddressThe IP address for the record.
method
src.geoip2.models.SimpleModel.network() -> ipaddress.IPv4Network | ipaddress.IPv6Network | NoneThe network associated with the record.
class
src.geoip2.records.AnonymizerFeedContains data for one type of anonymizer detection.
class
src.geoip2.records.MaxMindContains data related to your MaxMind account.
class
src.geoip2.records.RecordAll records are subclasses of the abstract class ``Record``.
method
src.geoip2.records.Traits.network() -> ipaddress.IPv4Network | ipaddress.IPv6Network | NoneThe network associated with the record.
class
src.geoip2.webservice.AsyncClientAn async GeoIP client.
method
src.geoip2.webservice.AsyncClient.city(ip_address:IPAddress='me') -> CityCall City Plus endpoint with the specified IP.
method
src.geoip2.webservice.AsyncClient.close() -> NoneClose underlying session.
method
src.geoip2.webservice.AsyncClient.country(ip_address:IPAddress='me') -> CountryCall the GeoIP Country endpoint with the specified IP.
method
src.geoip2.webservice.AsyncClient.insights(ip_address:IPAddress='me') -> InsightsCall the Insights endpoint with the specified IP.
class
src.geoip2.webservice.BaseClientBase class for AsyncClient and Client.
class
src.geoip2.webservice.ClientA synchronous GeoIP client.
method
src.geoip2.webservice.Client.city(ip_address:IPAddress='me') -> CityCall City Plus endpoint with the specified IP.
method
src.geoip2.webservice.Client.close() -> NoneClose underlying session.
method
src.geoip2.webservice.Client.country(ip_address:IPAddress='me') -> CountryCall the GeoIP Country endpoint with the specified IP.
method
src.geoip2.webservice.Client.insights(ip_address:IPAddress='me') -> InsightsCall the Insights endpoint with the specified IP.
About this data
These signatures were extracted from the public source of maxmind/GeoIP2-python
using Python's ast module. Argument names, default values,
type annotations and return types are taken verbatim from the code.
Implementation bodies are never stored. See
how it works for details.