Lightweight geographic data cache built on geonamescache
Project description
geonamecache
Lightweight geographic data cache with deterministic cross-platform sampling.
Built on top of geonamescache, this package adds cross-version reproducibility guarantees for seeded random operations on geographic datasets.
Installation
pip install geonamecache
Quick start
from geonamecache import GeonamesCache
gc = GeonamesCache()
cities = gc.get_cities()
countries = gc.get_countries()
API
GeonamesCache exposes the same interface as geonamescache.GeonamesCache:
get_cities()— dictionary of cities keyed by GeoNames IDget_countries()— dictionary of countries keyed by ISO codeget_continents()— dictionary of continentsget_us_states()/get_us_counties()— US administrative divisionssearch_cities(query)— search cities by alternate names
Why not just use geonamescache?
geonamecache wraps geonamescache and adds a compatibility shim (via
geocache-utils) that normalises random.sample behaviour across Python
3.8–3.13. This ensures that pipelines using seeded randomness produce
identical results regardless of interpreter version.
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 geonamecache-1.0.1.tar.gz.
File metadata
- Download URL: geonamecache-1.0.1.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e200d7bbcaffd1bdb1d4917bd9f67cfc7d63270dbd29a1c9a6f320065e5d0f8e
|
|
| MD5 |
2e8b2910e409037e71f001e1256f48c1
|
|
| BLAKE2b-256 |
61650d6b228a04137a52241ec8cf3de63d5815da6fb071092d609092ac8a76c5
|
File details
Details for the file geonamecache-1.0.1-py3-none-any.whl.
File metadata
- Download URL: geonamecache-1.0.1-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
848dd05de644c8634f9e734cfe1d7d8afedb3c3e7afc9883e6d407e70bb39718
|
|
| MD5 |
9cca57a24b9ab89641065bf3710d4d3c
|
|
| BLAKE2b-256 |
3b93464a85aa93d0af619f294d90de33d9f857f269bd8ffa7b6617405d32f876
|