sdkagent

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

KindCount
Classes25
Functions0
Methods24

API list

classsrc.geoip2._internal.Model
Shared methods for MaxMind model classes.
methodsrc.geoip2._internal.Model.to_dict() -> dict[str, Any]
Return a dict of the object suitable for serialization.
classsrc.geoip2.database.Reader
GeoIP database Reader object.
methodsrc.geoip2.database.Reader.anonymous_ip(ip_address:IPAddress) -> AnonymousIP
Get the AnonymousIP object for the IP address.
methodsrc.geoip2.database.Reader.anonymous_plus(ip_address:IPAddress) -> AnonymousPlus
Get the AnonymousPlus object for the IP address.
methodsrc.geoip2.database.Reader.asn(ip_address:IPAddress) -> ASN
Get the ASN object for the IP address.
methodsrc.geoip2.database.Reader.city(ip_address:IPAddress) -> City
Get the City object for the IP address.
methodsrc.geoip2.database.Reader.close() -> None
Close the GeoIP database.
methodsrc.geoip2.database.Reader.connection_type(ip_address:IPAddress) -> ConnectionType
Get the ConnectionType object for the IP address.
methodsrc.geoip2.database.Reader.country(ip_address:IPAddress) -> Country
Get the Country object for the IP address.
methodsrc.geoip2.database.Reader.domain(ip_address:IPAddress) -> Domain
Get the Domain object for the IP address.
methodsrc.geoip2.database.Reader.enterprise(ip_address:IPAddress) -> Enterprise
Get the Enterprise object for the IP address.
methodsrc.geoip2.database.Reader.isp(ip_address:IPAddress) -> ISP
Get the ISP object for the IP address.
methodsrc.geoip2.database.Reader.metadata() -> maxminddb.reader.Metadata
Get the metadata for the open database.
classsrc.geoip2.errors.AddressNotFoundError
The address you were looking up was not found.
methodsrc.geoip2.errors.AddressNotFoundError.network() -> ipaddress.IPv4Network | ipaddress.IPv6Network | None
The network associated with the error.
classsrc.geoip2.errors.AuthenticationError
There was a problem authenticating the request.
classsrc.geoip2.errors.GeoIP2Error
There was a generic error in GeoIP2.
classsrc.geoip2.errors.HTTPError
There was an error when making your HTTP request.
classsrc.geoip2.errors.InvalidRequestError
The request was invalid.
classsrc.geoip2.errors.OutOfQueriesError
Your account is out of funds for the service queried.
classsrc.geoip2.models.ASN
Model class for the GeoLite ASN.
classsrc.geoip2.models.AnonymousIP
Model class for the GeoIP Anonymous IP.
classsrc.geoip2.models.AnonymousPlus
Model class for the GeoIP Anonymous Plus.
classsrc.geoip2.models.City
Model for the City Plus web service and the City database.
classsrc.geoip2.models.ConnectionType
Model class for the GeoIP Connection-Type.
classsrc.geoip2.models.Country
Model for the Country web service and Country database.
classsrc.geoip2.models.Domain
Model class for the GeoIP Domain.
classsrc.geoip2.models.Enterprise
Model for the GeoIP Enterprise database.
classsrc.geoip2.models.ISP
Model class for the GeoIP ISP.
classsrc.geoip2.models.Insights
Model for the GeoIP Insights web service.
classsrc.geoip2.models.SimpleModel
Provides basic methods for non-location models.
methodsrc.geoip2.models.SimpleModel.ip_address() -> IPv4Address | IPv6Address
The IP address for the record.
methodsrc.geoip2.models.SimpleModel.network() -> ipaddress.IPv4Network | ipaddress.IPv6Network | None
The network associated with the record.
classsrc.geoip2.records.AnonymizerFeed
Contains data for one type of anonymizer detection.
classsrc.geoip2.records.MaxMind
Contains data related to your MaxMind account.
classsrc.geoip2.records.Record
All records are subclasses of the abstract class ``Record``.
methodsrc.geoip2.records.Traits.network() -> ipaddress.IPv4Network | ipaddress.IPv6Network | None
The network associated with the record.
classsrc.geoip2.webservice.AsyncClient
An async GeoIP client.
methodsrc.geoip2.webservice.AsyncClient.city(ip_address:IPAddress='me') -> City
Call City Plus endpoint with the specified IP.
methodsrc.geoip2.webservice.AsyncClient.close() -> None
Close underlying session.
methodsrc.geoip2.webservice.AsyncClient.country(ip_address:IPAddress='me') -> Country
Call the GeoIP Country endpoint with the specified IP.
methodsrc.geoip2.webservice.AsyncClient.insights(ip_address:IPAddress='me') -> Insights
Call the Insights endpoint with the specified IP.
classsrc.geoip2.webservice.BaseClient
Base class for AsyncClient and Client.
classsrc.geoip2.webservice.Client
A synchronous GeoIP client.
methodsrc.geoip2.webservice.Client.city(ip_address:IPAddress='me') -> City
Call City Plus endpoint with the specified IP.
methodsrc.geoip2.webservice.Client.close() -> None
Close underlying session.
methodsrc.geoip2.webservice.Client.country(ip_address:IPAddress='me') -> Country
Call the GeoIP Country endpoint with the specified IP.
methodsrc.geoip2.webservice.Client.insights(ip_address:IPAddress='me') -> Insights
Call 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.

Back to all 805 libraries