Key features:
- Easy: Designed to be easy to use and intuitive.
- Fast: Very high performance thanks to Pydantic and async support.
- Fast to code: Type hints and automatic docs let's you focus only on business logic.
- Standards-based: Based on the open standards for APIs: OpenAPI (previously known as Swagger) and JSON Schema.
https://github.com/vitalik/django-ninja
This code:
from ninja import NinjaAPI
api = NinjaAPI()
@api.get("/add")
def add(request, a: int, b: int):
return {"result": a + b}
Turns into: