skillfed

django-cities-light

Simple alternative to django-cities

django-cities-light v3.11 75.2K downloads/30d#14,743 on PyPI350
Permissive license MIT Active released

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-light

uv

uv add django-cities-light

poetry

poetry add django-cities-light

Installing 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 3.2Framework :: Django :: 4.0Framework :: Django :: 4.1Framework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries :: Python Modules

Tags

django geographic data importcities countries regions databasegeonames django modelslocation data management djangocity lookup django app
django-appgeonames-datalocation-reference

More Python Modules packages