django-countries
Provides a country field for Django models.
Decision gist · record as of 2026-08-14
Yes. django-countries is a mature, actively maintained package with low install friction, permissive licensing, no known vulnerabilities, and solid support for current Django and Python versions. Install it if you need country fields in Django models; the time saved on country data management and REST Framework integration justifies the dependency.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Django 4.2 or later and Python 3.10 or later.
- Low install friction with only two runtime dependencies (asgiref, typing-extensions).
- Active maintenance with recent commits and a stable production status across Python 3.10–3.14 and Django 4.2, 5.2, and 6.0.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) means you can use this package freely in commercial and private projects with minimal restrictions.
last release 2026-06-10 (65 days) · last repo commit 2026-06-10 · 1,532 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,329,133 downloads/mo, #3,134 on PyPI
Alternatives
Verify before relying
pip install django-countries
# In Django settings.py
INSTALLED_APPS = [
'django_countries',
]
# In your model
from django_countries.fields import CountryField
class Person(models.Model):
country = CountryField()- Whether translated country names cover all supported languages or a subset of common locales.
- Performance characteristics when handling large datasets with country field queries.
- Exact scope of GraphQL support and whether it requires additional dependencies beyond graphene-django.
What it is and what it does
django-countries is a Django application that adds a reusable country field to your models, backed by the ISO 3166-1 standard. It ships with static flag icon files, automatic translation of country names via Django's i18n system, and built-in support for Django REST Framework and graphene-django. The package has been in active development since 2014 and is currently maintained for modern Django and Python versions.
You use it by adding the app to INSTALLED_APPS and then importing CountryField into your models. It handles country validation, serialization, and rendering out of the box. The field integrates cleanly with Django forms and the REST Framework, so you get country dropdowns and API representations without extra glue code.
Use it for
- Add a country selector to user profiles or address forms with automatic flag display and translated country names.
- Build REST APIs that accept and return country data with proper serialization and validation.
- Store and query country information in multi-tenant or international applications without managing your own country list.
- Support multiple country selection in a single model field for applications that need to track regions or service areas.
- Localize country names in different languages automatically using Django's translation framework.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
django-countries is a mature, actively maintained package with low install friction, permissive licensing, no known vulnerabilities, and solid support for current Django and Python versions. Install it if you need country fields in Django models; the time saved on country data management and REST Framework integration justifies the dependency.
Install
django-countries on PyPI
Before you install
Low install friction with only two runtime dependencies (asgiref, typing-extensions). Active maintenance with recent commits and a stable production status across Python 3.10–3.14 and Django 4.2, 5.2, and 6.0.
Requires Django 4.2 or later and Python 3.10 or later.
License in practice
MIT license (permissive) means you can use this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install django-countries
# In Django settings.py
INSTALLED_APPS = [
'django_countries',
]
# In your model
from django_countries.fields import CountryField
class Person(models.Model):
country = CountryField()
Verify before relying
- Whether translated country names cover all supported languages or a subset of common locales.
- Performance characteristics when handling large datasets with country field queries.
- Exact scope of GraphQL support and whether it requires additional dependencies beyond graphene-django.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesasgireftyping-extensions |
| Maintenance | Actively maintained 65 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,329,133 / month, #3,134 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/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: django_countries-9.0.0-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 › “django country field”
- django-countriesProvides a Django model field for storing country data with built-in…
- django-phonenumbersProvides a Django model field and form field for storing, validating,…
- google-i18n-addressValidates, normalizes, and formats postal addresses according to…
Give your agent the search over MCP, or paste the wish link into any chat.
More Dynamic Content packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Soupsieve is a CSS selector library designed to work with Beautiful Soup 4 to select, match, and filter HTML and XML elements using modern CSS selectors from CSS level 1 through CSS level 4 specifications.
Install it if you use Beautiful Soup for HTML or XML parsing and want modern CSS selector support.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
Flask is a lightweight WSGI web application framework for building web applications in Python, from simple single-page sites to complex multi-route applications.
Mako compiles Python-embedded templates into Python modules for fast rendering, supporting layout inheritance, custom functions, and direct Python expressions within template syntax.
See also country_list · django-localflavor · pycountry-convert · iso3166 · pycountry · django-flags · django-phonenumber-field · django-cities-light · countryinfo · country-converter