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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f19898bde33d36d4de11d320b4c86788b54132ffddcac51e39a48555511ff9b |
|
MD5 | f72322c1fde0ad0ad3635d764cc580bc |
|
BLAKE2b-256 | 93d51baeb961377663aaa85d483bc6b9c780da5d5a943aa89eef71e4317d00c4 |
Close
Hashes for location_ipfire_db_reader-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b26f7e67f5640d9e7b1f152dd0df80a89b0a15e9d5b2f51839acfb773fa187d |
|
MD5 | 2988d35c56ac609283eeb652a65352c9 |
|
BLAKE2b-256 | 3cf327a84d6a7fa84822f0a08779591b7fa54d3d12a4bb3123631d59e75468dc |