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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9187fd480c5a79faabbf1557421117acc364d9399285f31f5b1a2c2b8d7c6dee |
|
MD5 | 783342a81bc2285689c0c14a17e33c09 |
|
BLAKE2b-256 | dbc6c4915582f3a6f2772eee22bfb9707b8c1a7972483cb0973fc5e54217891d |
Close
Hashes for location_ipfire_db_reader-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fdc33bf2d58ed4f5d7eb42cea3cb1d6ea6e46f216177628b2a5d832f56f1947 |
|
MD5 | 9bb51969c0ce2d90cd717753a538b22e |
|
BLAKE2b-256 | ca12b344d1ffdcb5ca002b5f47c5b4bb0dc198294ac373ac33265bb6348bf774 |