#1616th of 45 in Backend and cloud templates
django-ninja
Type-hint-based REST API framework for Django with OpenAPI docs
Documentation ↗
(opens in a new tab)Website ↗
(opens in a new tab)Repository on GitHub ↗
(opens in a new tab)
- Stars
- 9.2k
- License
- MIT
- Last commit
- Nov 2026
- Last release
- Nov 2026
- Language
- Python
8,936 on 21 Apr 20269,242 on 10 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
Django Ninja is a Python library for building APIs inside a Django project, using type hints and Pydantic for validation and serialization. It generates an OpenAPI schema and serves interactive Swagger UI or Redoc docs at /api/docs. It supports async views and works with the Django ORM. It is a general API framework with no AI-specific features.
Who it is for: Django developers adding typed REST APIs, including endpoints that serve models
Strengths
- Validates and type-casts request parameters from function signatures via Pydantic
- Generates OpenAPI schema and interactive Swagger UI or Redoc docs automatically
- Added to an existing Django project with an api.py file and one URL entry
- Supports async views and integrates with the Django ORM
Weaknesses
- Requires Django; not usable as a standalone framework
- No AI, model or agent features; only a general API layer
- README shows benchmarks only as an image, with no figures in text
- Not a template: no auth, billing or model integration included
What it needs
- Python
- Needs Django, Pydantic
Quick answers
Is django-ninja open source?
Yes. Its code is on GitHub under the MIT license.
Also in Backend and cloud templates
See all 45| Rank | Project | Score |
|---|---|---|
| 1 | fastapiPython web framework for typed REST APIs with automatic OpenAPI docs | 90 out of 100 |
| 2 | fiberExpress-style HTTP web framework for Go, built on fasthttp | 90 out of 100 |
| 3 | generator-jhipsterCode generator for Java apps with Angular, React or Vue frontends | 90 out of 100 |
| #4 | serverlessCLI that deploys AWS Lambda code and infrastructure from serverless.yml | 88 out of 100 |
| #5 | echoMinimalist Go web framework with a radix-tree router and middleware | 86 out of 100 |