django-ninja
Django Ninja - Fast Django REST framework
Decision gist · record as of 2026-08-14
Yes. Django Ninja is actively maintained, has no known vulnerabilities, uses permissive MIT licensing, and integrates cleanly with Django and Pydantic. It reduces boilerplate by using type hints for both validation and documentation. Install it if you're building a REST API in Django and want automatic schema generation and validation without extra configuration overhead.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Django and Python 3.7 or later; must be integrated into an existing Django project.
- Low install friction with a pure-Python wheel.
- Actively maintained with recent commits and a large repository presence (9164 stars).
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2026-03-18 (149 days) · last repo commit 2026-07-08 · 9,164 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,134,182 downloads/mo, #2,735 on PyPI
Alternatives
Verify before relying
pip install django-ninja
from ninja import NinjaAPI
api = NinjaAPI()
@api.get("/add")
def add(request, a: int, b: int):
return {"result": a + b}- Whether async support requires additional configuration or specific application server setup.
- Performance characteristics compared to other Django REST frameworks under production loads.
- Maturity and adoption rate of async features specifically.
What it is and what it does
Django Ninja is a REST API framework that layers on top of Django, using Python type hints to define request/response schemas and validation. Instead of writing separate schema definitions, you declare function parameters with type annotations, and Pydantic automatically validates incoming data and generates OpenAPI documentation. It supports both synchronous and asynchronous request handlers, integrates with Django's ORM, and produces interactive API docs at a standard endpoint.
The framework is designed to reduce boilerplate: type hints serve double duty as both documentation and validation rules, so you write less code to define the same API surface. It's built on Django and Pydantic, both mature and widely used, and is marked as production-ready with active maintenance and real-world adoption.
Use it for
- Build a REST API on top of an existing Django project without rewriting the core application.
- Generate OpenAPI documentation automatically from type-hinted endpoint definitions.
- Validate JSON request bodies and query parameters using Pydantic schemas defined inline.
- Create async endpoints in Django to handle high-concurrency workloads.
- Prototype and iterate on API designs quickly by writing minimal endpoint code.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Django Ninja is actively maintained, has no known vulnerabilities, uses permissive MIT licensing, and integrates cleanly with Django and Pydantic. It reduces boilerplate by using type hints for both validation and documentation. Install it if you're building a REST API in Django and want automatic schema generation and validation without extra configuration overhead.
Install
django-ninja on PyPI
Before you install
Low install friction with a pure-Python wheel. Actively maintained with recent commits and a large repository presence (9164 stars). Supports Django 3.1 through 6.0 and Python 3.7–3.14.
Requires Django and Python 3.7 or later; must be integrated into an existing Django project.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install django-ninja
from ninja import NinjaAPI
api = NinjaAPI()
@api.get("/add")
def add(request, a: int, b: int):
return {"result": a + b}
Verify before relying
- Whether async support requires additional configuration or specific application server setup.
- Performance characteristics compared to other Django REST frameworks under production loads.
- Maturity and adoption rate of async features specifically.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesDjangopydantic |
| Maintenance | Actively maintained 149 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,134,182 / month, #2,735 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 :: AsyncIOFramework :: DjangoFramework :: Django :: 3.1Framework :: Django :: 3.2Framework :: Django :: 4.1Framework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming 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.14Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: InternetTopic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: HTTP ServersTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed |
Evidence: django_ninja-1.6.2-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 › “fast django rest”
- django-ninjaDjango Ninja builds type-hint-based REST APIs on top of Django, using…
- drf-orjson-rendererProvides a high-performance JSON renderer and parser for Django REST…
- django-rest-authProvides REST API endpoints for user authentication and registration…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also django-ninja-extra · flask-openapi3 · django-ninja-jwt · drf-yasg · flask-pydantic-spec · django-rest-swagger · aiopenapi3 · drf-spectacular · openapi-pydantic