geonamescache
Geonames data for continents, cities and US states.
Decision gist · record as of 2026-08-14
Yes. It's a lightweight, actively maintained reference library with no security vulnerabilities, permissive licensing, and a narrow, well-defined purpose. Install it if you need reliable geographic codes and names; skip it if you need real-time geocoding or mapping services.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction install with a single lightweight dependency (typing-extensions).
- Actively maintained with a recent release 17 days ago and continuous repository activity.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions, making it safe for most projects.
last release 2026-07-28 (17 days) · last repo commit 2026-07-28 · 126 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 931,913 downloads/mo, #4,700 on PyPI
Alternatives
Verify before relying
pip install geonamescache
import geonamescache
gc = geonamescache.GeonamesCache()
countries = gc.get_countries()
print(countries)- Whether the bundled GeoNames dataset is updated regularly or requires manual refresh.
- Performance characteristics when searching across large city datasets.
- Memory footprint when loading all cities at minimum population threshold.
- Specific ISO and FIPS code standards covered by the dataset.
What it is and what it does
GeonamesCache wraps geographic reference data from GeoNames into a Python library, letting you query continents, countries, US states, counties, and cities as dictionaries. It includes country codes, state and county codes, population figures, and geographic coordinates. The library loads data into memory on initialization, then provides lookup and search methods to retrieve records by code, name, or partial match.
You'd use it when you need reliable geographic identifiers and metadata in your application—mapping user input to country codes, validating state abbreviations, finding cities by name, or building reference data for location-based features. It's a reference library rather than a mapping or geocoding service; it doesn't convert addresses to coordinates or vice versa, but it does provide the canonical codes and names you'd use alongside such services.
Use it for
- Validate and normalize country or state codes in user input or data imports.
- Build dropdown menus or autocomplete for location selection in web forms.
- Map city names to population and geographic coordinates for analytics or filtering.
- Create reference lookups for codes in data pipelines.
- Search for cities by partial name match across the dataset.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
It's a lightweight, actively maintained reference library with no security vulnerabilities, permissive licensing, and a narrow, well-defined purpose. Install it if you need reliable geographic codes and names; skip it if you need real-time geocoding or mapping services.
Install
geonamescache on PyPI
Before you install
Low friction install with a single lightweight dependency (typing-extensions). Actively maintained with a recent release 17 days ago and continuous repository activity.
Requires Python 3.10 or later.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it safe for most projects.
Quickstart
pip install geonamescache
import geonamescache
gc = geonamescache.GeonamesCache()
countries = gc.get_countries()
print(countries)
Verify before relying
- Whether the bundled GeoNames dataset is updated regularly or requires manual refresh.
- Performance characteristics when searching across large city datasets.
- Memory footprint when loading all cities at minimum population threshold.
- Specific ISO and FIPS code standards covered by the dataset.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetyping-extensions |
| Maintenance | Actively maintained 17 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 931,913 / month, #4,700 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Libraries :: Python Modules |
Evidence: geonamescache-3.0.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “geographic data lookup”
- geonamescacheProvides Python dictionaries of geographic data including continents,…
- pypostalcodeLooks up Canadian postal codes to retrieve city, province, geographic…
- censusProvides a Python wrapper for the United States Census Bureau's API,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also countryinfo · geotext · us · reverse-geocode · country_list · isocodes · pycountry · names-dataset · pgeocode · census