Skip to main content

Easily get the country code from an ip address.

Project description

location_ipfire_db_reader

Main usage:

from location_ipfire_db_reader import LocationDatabase
from pathlib import Path


location_db = Path('location.db')
# This call will download the location database into the provided file.
#   It will not re-download it if there are no updates.
LocationDatabase.download(location_db)

db = LocationDatabase(location_db)
print(db.find_country('8.8.8.8'))  # US

Should work for both IP4 & IP6.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

location_ipfire_db_reader-1.0.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file location_ipfire_db_reader-1.0.1.tar.gz.

File metadata

File hashes

Hashes for location_ipfire_db_reader-1.0.1.tar.gz
Algorithm Hash digest
SHA256 10a402f4bada892f755f82b1232cedec9a80e0b988ea994847b3797857f3a8f8
MD5 3b71b5aed278bd69cff52c8e72bd0843
BLAKE2b-256 a46414f0f5fc04d7b26d095e21cece6db2ed29b509fc66b5d048ddb78b8f3940

See more details on using hashes here.

File details

Details for the file location_ipfire_db_reader-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for location_ipfire_db_reader-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7e61785c2e91e2ed86086c4e46249438f28a43117f85e0e7c2a9d92504117840
MD5 1b8ac42f292ab0d3059733bd35011845
BLAKE2b-256 92968dcda43e9e73ace4db61e78768a6407725de95873f822f6e5fd44db0bacf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page