--- id: django-ninja version: "1.6.2" license: unclear license_treatment: permissive maintenance: active --- # django-ninja — Django Ninja - Fast Django REST framework License: permissive · Maintenance: active · Downloads: 3.1M/mo ## 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 above — verify before relying. Django Ninja builds type-hint-based REST APIs on top of Django, using Pydantic for validation and async support to generate OpenAPI documentation automatically. 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 pip install django-ninja uv add django-ninja poetry add django-ninja ## Installing django-ninja 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. 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} Requires Django and Python 3.7 or later; must be integrated into an existing Django project. 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: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 3.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags django rest api framework, type-hint based api builder, django async api, openapi schema generation, pydantic validation django, fast django rest, django api with type hints, rest-api, type-hints, async-support [View on SkillFed](https://skillfed.io/packages/django-ninja) · [View on PyPI](https://pypi.org/project/django-ninja/)