Metadata-Version: 2.1
Name: location-ipfire-db-reader
Version: 1.0.1
Summary: Easily get the country code from an ip address.
License: MIT
Author: Steven Van Ingelgem
Author-email: steven@vaningelgem.be
Requires-Python: >=3.7
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: requests (>=2)
Project-URL: Source Code, https://github.com/svaningelgem/location_ipfire_db_reader
Description-Content-Type: text/markdown

# location_ipfire_db_reader

## Main usage:
```python
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.

