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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0690bc3922b08b6f33186ef4d1ef536bb60421eba2ae3337593efb80dd71023 |
|
MD5 | 6cbd67aaad425ed144de05529323ce4f |
|
BLAKE2b-256 | 4d4e0bd661965d1ca88e76d92949941e3325809c2c2bf9e22512ce29e1ee56b1 |
Close
Hashes for location_ipfire_db_reader-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc33b721575797a1595a5ce8f2d227486133ce0bd2c0dbe270dfdc0d9b6bfa89 |
|
MD5 | 247573ceeb68b6c1b040bbd1e77f5ad5 |
|
BLAKE2b-256 | 557db23fa3b6d7906a3a8deed615a0b2cdbfe554e4bfc7f628908b388e7bf939 |