Meta tags:
description= Django Ninja - Django REST framework with high performance, easy to learn, fast to code.;
Headings (most frequently used words):
django, ninja, fast, rest, framework, installation, quick, example, check, it, interactive, api, docs, recap,
Text of the page (most frequently used words):
django (18), api (13), and (13), the (11), ninja (11), you (10), for (9), part (8), quick (7), parameters (7), #interactive (6), docs (6), with (5), start (5), data (5), from (5), path (5), json (5), openapi (5), add (5), urls (5), automatic (4), python (4), type (4), get (4), schema (4), int (4), example (4), request (4), admin (4), home (4), now (3), that (3), project (3), types (3), headers (3), cookies (3), validation (3), support (3), item (3), recap (3), http (3), result (3), your (3), check (3), ninjaapi (3), import (3), use (3), installation (3), fast (3), guide (3), tutorial (3), next (2), just (2), documentation (2), forms (2), query (2), errors (2), operation (2), def (2), standard (2), don (2), have (2), new (2), etc (2), body (2), only (2), will (2), see (2), swagger (2), 127 (2), 8000 (2), response (2), open (2), please (2), email (2), based (2), standards (2), apis (2), hints (2), async (2), easy (2), framework (2), table (2), contents (2), about (2), testing (2), versioning (2), filtering (2), pagination (2), schemas (2), file (2), uploads (2), routers (2), search (2), auth (2), vitalik (2), made, material, mkdocs, back, top, created, this, was, heavily, inspired, developed, sebastián, ramírez, fastapi, input, coming, network, reading, files, conversion, even, deeply, nested, objects, clear, when, invalid, editor, including, checks, completion, single, declaration, float, bar, str, foo, class, more, complex, model, learn, syntax, methods, classes, specific, library, modern, summary, declare, function, once, provided, redoc, generates, defined, decodes, takes, validates, casts, receives, browser, note, installed, apps, work, manage, runserver, run, usual, site, urlpatterns, return, contrib, startproject, apidemo, existing, one, pip, install, benchmarks, used, multiple, companies, live, projects, would, like, publish, feedback, protected, production, ready, obviously, has, good, integration, core, orm, friendly, previously, known, lets, focus, business, logic, code, very, high, performance, thanks, pydantic, execution, designed, intuitive, key, features, web, building, russia, invaded, ukraine, read, rest, settings, webhooks, decorators, exception, handling, throttling, csrf, authentication, renderers, temporal, responses, configuration, create_schema, modelschema, parsers, form, reverse, operations, instance, polish, ordering, permissions, workflows, relations, computed, fields, setup, layout, steps, models, initializing, skip, content,
Text of the page (random words):
django ninja skip to content django ninja home initializing search vitalik django ninja home quick start tutorial guide about django ninja vitalik django ninja home home table of contents installation quick example check it interactive api docs recap quick start quick start models schemas auth routers next steps tutorial tutorial part 1 project setup layout part 2 relations computed fields part 3 validation workflows part 4 auth permissions part 5 filtering search ordering pagination part 6 file uploads forms part 7 testing part 8 openapi polish versioning guide guide the ninjaapi instance operations routers urls reverse path parameters query parameters request body form data file uploads headers cookies request parsers schemas modelschema create_schema schema configuration responses headers cookies temporal response renderers pagination filtering authentication csrf throttling errors exception handling decorators async support versioning openapi interactive docs webhooks testing settings about table of contents installation quick example check it interactive api docs recap django ninja fast django rest framework russia invaded ukraine please read django ninja is a web framework for building apis with django and python 3 6 type hints key features easy designed to be easy to use and intuitive fast execution very high performance thanks to pydantic and async support fast to code type hints and automatic docs lets you focus only on business logic standards based based on the open standards for apis openapi previously known as swagger and json schema django friendly obviously has good integration with the django core and orm production ready used by multiple companies on live projects if you use django ninja and would like to publish your feedback please email email protected benchmarks installation pip install django ninja quick example start a new django project or use an existing one django admin startproject apidemo in urls py from django contrib import admin from django urls import path from ninja import ninjaapi api ninjaapi api get add def add request a int b int return result a b urlpatterns path admin admin site urls path api api urls now run it as usual manage py runserver note you don t have to add django ninja to your installed apps for it to work check it open your browser at http 127 0 0 1 8000 api add a 1 b 2 you will see the json response as result 3 now you ve just created an api that receives an http get request at api add takes validates and type casts get parameters a and b decodes the result to json generates an openapi schema for defined operation interactive api docs now go to http 127 0 0 1 8000 api docs you will see the automatic interactive api documentation provided by the openapi swagger ui or redoc recap in summary you declare the types of parameters body etc once only as function parameters you do that with standard modern python types you don t have to learn a new syntax the methods or classes of a specific library etc just standard python 3 6 for example for an int a int or for a more complex item model class item schema foo str bar float def operation a item and with that single declaration you get editor support including completion type checks validation of data automatic and clear errors when the data is invalid validation even for deeply nested json objects conversion of input data coming from the network to python data and types and reading from json path parameters query parameters cookies headers forms files automatic interactive api documentation this project was heavily inspired by fastapi developed by sebastián ramírez back to top next quick start made with material for mkdocs
|