#1616th of 45 in Backend and cloud templates

django-ninja

Type-hint-based REST API framework for Django with OpenAPI docs

Stars
9.2k
License
MIT
Last commit
Nov 2026
Last release
Nov 2026
Language
Python
Stars, last 29 weeks+306
21 Apr 2026: 8,936 stars28 Apr 2026: 8,952 stars5 May 2026: 8,965 stars12 May 2026: 8,979 stars19 May 2026: 8,989 stars26 May 2026: 9,003 stars2 Jun 2026: 9,015 stars9 Jun 2026: 9,025 stars16 Jun 2026: 9,037 stars23 Jun 2026: 9,047 stars30 Jun 2026: 9,053 stars7 Jul 2026: 9,065 stars14 Jul 2026: 9,082 stars21 Jul 2026: 9,093 stars28 Jul 2026: 9,105 stars4 Aug 2026: 9,112 stars11 Aug 2026: 9,121 stars18 Aug 2026: 9,127 stars25 Aug 2026: 9,141 stars1 Sept 2026: 9,149 stars8 Sept 2026: 9,159 stars15 Sept 2026: 9,167 stars22 Sept 2026: 9,173 stars29 Sept 2026: 9,183 stars6 Oct 2026: 9,192 stars13 Oct 2026: 9,201 stars20 Oct 2026: 9,209 stars27 Oct 2026: 9,219 stars3 Nov 2026: 9,230 stars10 Nov 2026: 9,242 stars

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
Also in Backend and cloud templates
RankProjectScore
1fastapiPython web framework for typed REST APIs with automatic OpenAPI docs104.6k starsMIT90 out of 100
2fiberExpress-style HTTP web framework for Go, built on fasthttp40.3k stars+130 (+0.3%) in 30 daysMIT90 out of 100
3generator-jhipsterCode generator for Java apps with Angular, React or Vue frontends22.5k starsApache-2.090 out of 100
#4serverlessCLI that deploys AWS Lambda code and infrastructure from serverless.yml46.9k starscustom license88 out of 100
#5echoMinimalist Go web framework with a radix-tree router and middleware32.8k stars+73 (+0.2%) in 30 daysMIT86 out of 100