geomelon 1.0.0 — initial release
Python client for the Geomelon API — cities, countries, regions, and languages with multilingual support (50+ languages).
Highlights
- Zero dependencies — Python standard library only (
urllib), nothing to audit, nothing to conflict - Wide Python support — 3.8 through 3.14, pure-Python wheel, CI-tested on every version
- Fully typed — dataclass models, complete type hints,
py.typedmarker (works with mypy/pyright out of the box) - No API key needed to try it — free city autocomplete via the oneshot endpoint:
from geomelon import GeomelonClient
client = GeomelonClient() # no key, no signup
for city in client.oneshot.search("es", "es", "barc"):
print(city.name, city.population, city.emoji)
# Barcelona 1620343 🇪🇸Full API coverage (with a RapidAPI key (https://rapidapi.com/hom3chuk/api/geomelon))
- client.cities — search, get, translations, settlement_types, distance, by_coordinates_closest, by_coordinates_largest
- client.countries — list, get, translations, regions
- client.regions — list, get, translations
- client.languages — list, get
- client.oneshot — search (routes through RapidAPI when a key is set; pass free_oneshot=True to use the free keyless host instead)
Details
- Typed GeomelonError on every failure — HTTP status, raw body, request url, and an is_rate_limited shortcut for 429s; network-level failures raise the same exception with status=None
- Keyword-only snake_case params mapped 1:1 to the API's camelCase (country_code → countryCode); None params are omitted
- Forward-compatible parsing — unknown response fields are ignored, so server-side additions never break an installed client
- Search prefixes are sent as typed — the server normalizes case, punctuation, and diacritics ("Barç" finds Barcelona)
- Configurable host and per-request timeout
Install
pip install geomelon