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
File details
Details for the file location_ipfire_db_reader-1.0.0.tar.gz
.
File metadata
- Download URL: location_ipfire_db_reader-1.0.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.10.9 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9187fd480c5a79faabbf1557421117acc364d9399285f31f5b1a2c2b8d7c6dee |
|
MD5 | 783342a81bc2285689c0c14a17e33c09 |
|
BLAKE2b-256 | dbc6c4915582f3a6f2772eee22bfb9707b8c1a7972483cb0973fc5e54217891d |
File details
Details for the file location_ipfire_db_reader-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: location_ipfire_db_reader-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.10.9 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fdc33bf2d58ed4f5d7eb42cea3cb1d6ea6e46f216177628b2a5d832f56f1947 |
|
MD5 | 9bb51969c0ce2d90cd717753a538b22e |
|
BLAKE2b-256 | ca12b344d1ffdcb5ca002b5f47c5b4bb0dc198294ac373ac33265bb6348bf774 |