| Crates.io | geodb-py |
| lib.rs | geodb-py |
| version | 0.1.3 |
| created_at | 2025-11-17 15:56:39.216876+00 |
| updated_at | 2025-11-18 00:31:24.494267+00 |
| description | Python bindings for geodb-rs |
| homepage | https://github.com/holg/geodb-rs |
| repository | https://github.com/holg/geodb-rs |
| max_upload_size | |
| id | 1937066 |
| size | 15,562,486 |
Python bindings for the geodb-rs project.
For full documentation, examples, and details about the underlying Rust library, please see the main project README:
Project repository: https://github.com/holg/geodb-rs
Main README: https://github.com/holg/geodb-rs/blob/main/README.md
# Load the database
import geodb_py
db = geodb.PyGeoDb.load_default()
# Find a country by ISO2 code
country = db.find_country_by_iso2("US")
if country:
print(f"Country: {country['name']}")
print(f"Capital: {country['capital']}")
print(f"Phone Code: {country['phone_code']}")
print(f"Currency: {country['currency']}")
# Search countries by phone code
countries = db.find_countries_by_phone_code("+1")
for country in countries:
print(f"{country['name']} uses phone code +1")