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
Built Distribution
Close
Hashes for location_ipfire_db_reader-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10a402f4bada892f755f82b1232cedec9a80e0b988ea994847b3797857f3a8f8 |
|
MD5 | 3b71b5aed278bd69cff52c8e72bd0843 |
|
BLAKE2b-256 | a46414f0f5fc04d7b26d095e21cece6db2ed29b509fc66b5d048ddb78b8f3940 |
Close
Hashes for location_ipfire_db_reader-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e61785c2e91e2ed86086c4e46249438f28a43117f85e0e7c2a9d92504117840 |
|
MD5 | 1b8ac42f292ab0d3059733bd35011845 |
|
BLAKE2b-256 | 92968dcda43e9e73ace4db61e78768a6407725de95873f822f6e5fd44db0bacf |