djangorestframework-gis
Geographic add-ons for Django Rest Framework
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive BSD license. It directly solves the problem of serializing GeoDjango geometries in REST APIs and is the standard tool for this task in the Django ecosystem. Install it if you need to expose spatial data via REST.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires django, djangorestframework, and django-filter as runtime dependencies; GeoDjango support in your Django installation is assumed.
- Low install friction with a pure-Python wheel distribution.
- Actively maintained with recent releases; last commit 2026-08-10 and 1125 repository stars indicate ongoing support.
License · maintenance · safety
BSD (permissive) — BSD license is permissive, allowing commercial and private use with minimal restrictions—suitable for most projects.
last release 2026-05-04 (102 days) · last repo commit 2026-08-10 · 1,125 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 451,961 downloads/mo, #6,584 on PyPI
Alternatives
Verify before relying
pip install djangorestframework-gis
# In settings.py, add to INSTALLED_APPS after rest_framework:
INSTALLED_APPS = [
'rest_framework',
'rest_framework_gis',
]
# GeometryField handles geometry serialization automatically once installed.- Whether GeoDjango/GEOS is automatically available or requires separate system-level spatial libraries
- Performance characteristics when handling large GeoJSON responses with precision rounding or duplicate removal
- Exact Python version requirements beyond the classifiers listed (3.9 to 3.13)
What it is and what it does
djangorestframework-gis extends Django REST Framework with geographic data handling, automatically mapping GeoDjango geometry fields to a custom GeometryField that serializes to and from GeoJSON. It provides a GeometryField with optional coordinate precision rounding, duplicate coordinate removal, bounding-box generation, and coordinate transformation support, plus a GeometrySerializerMethodField for computed geometry values. The package integrates transparently into DRF's serializer system once added to INSTALLED_APPS, eliminating the need for explicit field declarations in most cases.
The package is built on top of django, djangorestframework, and django-filter, and is designed for REST APIs that expose spatial data—locations, boundaries, routes, or any geometry stored in a GeoDjango model. It handles the conversion between database geometry representations and the GeoJSON standard expected by web clients and mapping libraries.
Use it for
- Build a location-based REST API that returns points, polygons, or linestrings as GeoJSON for mapping frontends
- Serialize GeoDjango models with geometry fields without manual field mapping or custom serializer logic
- Reduce API response size by rounding coordinate precision or removing duplicate points from geometries
- Transform geometries to a standard projection for GeoJSON compliance in REST responses
- Create computed geometry fields in serializers using GeometrySerializerMethodField for derived spatial data
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive BSD license. It directly solves the problem of serializing GeoDjango geometries in REST APIs and is the standard tool for this task in the Django ecosystem. Install it if you need to expose spatial data via REST.
Install
djangorestframework-gis on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with recent releases; last commit 2026-08-10 and 1125 repository stars indicate ongoing support.
Requires django, djangorestframework, and django-filter as runtime dependencies; GeoDjango support in your Django installation is assumed.
License in practice
BSD license is permissive, allowing commercial and private use with minimal restrictions—suitable for most projects.
Quickstart
pip install djangorestframework-gis
# In settings.py, add to INSTALLED_APPS after rest_framework:
INSTALLED_APPS = [
'rest_framework',
'rest_framework_gis',
]
# GeometryField handles geometry serialization automatically once installed.
Verify before relying
- Whether GeoDjango/GEOS is automatically available or requires separate system-level spatial libraries
- Performance characteristics when handling large GeoJSON responses with precision rounding or duplicate removal
- Exact Python version requirements beyond the classifiers listed (3.9 to 3.13)
Package facts
| License | BSD permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesdjangodjangorestframeworkdjango-filter |
| Maintenance | Actively maintained 102 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 451,961 / month, #6,584 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 :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP |
Evidence: djangorestframework_gis-1.2.1-py2.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 rest framework geojson”
- djangorestframework-gisAdds geographic and GeoJSON support to Django REST Framework,…
- djangorestframework-typesProvides type stubs for Django Rest Framework, enabling static type…
- django-rest-swaggerGenerates Swagger UI documentation and OpenAPI JSON schemas for…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also geojson · geopandas · arcgis2geojson · djangorestframework-recursive · django-jsonfield · pydantic-geojson · djangorestframework-stubs · drf-extra-fields · geojson-pydantic · algoliasearch-django