Lookup ISO 3166-2 geographic subdivisions from postal and country codes, using GeoNames and pycountry.
Project description
geosub v0.1.1a0
Docs: https://geosub.readthedocs.io/
Lookup ISO 3166-2 geographic subdivisions from postal and country codes, using GeoNames and pycountry.
Adapted from a very similar library for looking up timezones: https://github.com/dmayo3/geotz
Motivation
Easy to use. No API key or external API service required.
Fast offline lookup.
No downloads required; the necessary data comes bundled with the package.
No network requests.
I tried to keep the extra dependencies to a minimum. Only pycountry is required.
Data is loaded from disk on demand, so as to not use unnecessary memory.
Development
To run the build, there’s the GitHub actions workflows as well as the option to run locally.
For running the build locally, use pip install tox and the run tox in the repository base directory (or tox -p to run the build in parallel).
Ensure you have tox installed e.g. by running pip install tox
Extract data tox -e extract_data
Run the build: tox
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geosub-0.1.1a0.tar.gz.
File metadata
- Download URL: geosub-0.1.1a0.tar.gz
- Upload date:
- Size: 16.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0272bfe4744800db111b4729992ad9db2896899e641abc3c6236b5352dbd1f91
|
|
| MD5 |
9ea2478f24da6dd76fd477f73ba88309
|
|
| BLAKE2b-256 |
0ea0be5278d71f9098b522704120344721298b7f9b1dec7ef870ff1a58d334ea
|
File details
Details for the file geosub-0.1.1a0-py3-none-any.whl.
File metadata
- Download URL: geosub-0.1.1a0-py3-none-any.whl
- Upload date:
- Size: 17.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33800a388efca57b7492c2e48399e85e3fc0f77607dbd40648dfe75b162820e9
|
|
| MD5 |
459f2a403e5a3707a248a26aa6c036ef
|
|
| BLAKE2b-256 |
c55ba014fb234d91f4cd32e465b950581d748bce62bdf600bf61a6ff71fb2325
|