django-cities-light
Simple alternative to django-cities
What it is and what it does
django-cities-light is a Django app that syncs geographic reference data—countries, regions, subregions, and cities—from GeoNames into your database. It provides models and a management command to download and import this data, with options to filter by country, language, and city type. The package is designed for simple use cases like address books or location dropdowns, not for spatial queries or complex geographic analysis.
Once installed and configured, you run a single management command to populate your database. The app includes built-in Django admin support, GraphQL integration, and Rest-Framework compatibility. It handles data updates and can export/import via fixtures to avoid repeated downloads. Configuration is done through Django settings, allowing you to exclude unwanted data and manage index size issues on large imports.
Use it for:
- Build a user registration form with country and city dropdowns populated from GeoNames data
- Create a simple address book or contact management system with geographic location fields
- Populate a shipping or billing address selector with validated countries and cities
- Set up a location-based filtering system for a directory or marketplace without spatial queries
- Migrate geographic reference data between development, staging, and production servers using fixtures
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Django models and management commands to import and manage geographic data (countries, regions, cities) from GeoNames into your database.
Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and solves a straightforward problem—importing and managing geographic reference data in Django. It's appropriate for applications that need simple location lookups without spatial query requirements. The MIT license carries no restrictions. Install it if you need to populate countries, regions, and cities in your Django app.
Install
django-cities-light on PyPI
pip
pip install django-cities-lightuv
uv add django-cities-lightpoetry
poetry add django-cities-lightInstalling django-cities-light
Before you install
Low friction install with five straightforward runtime dependencies. Actively maintained with recent commits and production-stable status.
License in practice
MIT license permits commercial and private use with minimal restrictions.
Quickstart
pip install django-cities-light
# In settings.py, add to INSTALLED_APPS:
INSTALLED_APPS = [
...
'cities_light',
]
# Then run:
./manage.py migrate
./manage.py cities_light
Requires Django >= 4.2 and Python >= 3.10; needs MySQL, PostgreSQL, or SQLite database.
Verify before relying
- Performance characteristics of the import command on large datasets or with all city types enabled
- Whether GraphQL, Rest-Framework, and Ajax Select integrations work out-of-the-box or require additional configuration
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — pytz, psutil, unidecode, django-autoslug, progressbar2 |
| Maintenance | actively maintained — 179 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 75,189/month — #14,743 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_cities_light-3.11-py3-none-any.whl
Keywords: django, cities, countries, postal, codes
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
django-autocomplete-lightProvides autocomplete widgets for Django forms…
permissive · top 15,000 on PyPI
django-postgres-copyProvides Django ORM integration for…
permissive · top 5,000 on PyPI
geonamescacheProvides Python dictionaries of geographic data…
permissive · top 5,000 on PyPI
django-countriesProvides a Django model field for storing…
permissive · top 5,000 on PyPI
geotextGeotext extracts mentions of countries and…
permissive · top 15,000 on PyPI
reverse-geocodeReverse Geocode converts latitude/longitude…
copyleft · top 15,000 on PyPI
django-localflavorProvides country-specific form fields,…
permissive · top 5,000 on PyPI
django-fixture-magicProvides Django management commands to dump…
permissive · top 15,000 on PyPI
countryinfoCountryinfo provides a Python interface to…
permissive · top 15,000 on PyPI
dj-materialized-viewsManages PostgreSQL materialized views through a…
permissive · top 15,000 on PyPI