{"id":13501445,"url":"https://github.com/vitalik/django-ninja","last_synced_at":"2025-05-12T03:43:27.544Z","repository":{"id":37404926,"uuid":"265194554","full_name":"vitalik/django-ninja","owner":"vitalik","description":"💨  Fast, Async-ready, Openapi, type hints based framework for building APIs","archived":false,"fork":false,"pushed_at":"2025-05-01T08:47:58.000Z","size":7313,"stargazers_count":8089,"open_issues_count":381,"forks_count":488,"subscribers_count":71,"default_branch":"master","last_synced_at":"2025-05-09T00:11:44.522Z","etag":null,"topics":["django","django-ninja","openapi","pydantic","python","rest-api","swagger","swagger-ui"],"latest_commit_sha":null,"homepage":"https://django-ninja.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vitalik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":["https://www.buymeacoffee.com/djangoninja"]}},"created_at":"2020-05-19T08:48:53.000Z","updated_at":"2025-05-08T23:19:44.000Z","dependencies_parsed_at":"2022-06-27T21:23:22.956Z","dependency_job_id":"c5b55458-8c71-4e23-aed7-6c190a8aacf1","html_url":"https://github.com/vitalik/django-ninja","commit_stats":{"total_commits":911,"total_committers":147,"mean_commits":6.197278911564626,"dds":0.5060373216245884,"last_synced_commit":"de40a7fc10fd0eb35815096c87c5ecf6404700c9"},"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalik%2Fdjango-ninja","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalik%2Fdjango-ninja/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalik%2Fdjango-ninja/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalik%2Fdjango-ninja/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitalik","download_url":"https://codeload.github.com/vitalik/django-ninja/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253342299,"owners_count":21893558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","django-ninja","openapi","pydantic","python","rest-api","swagger","swagger-ui"],"created_at":"2024-07-31T22:01:37.876Z","updated_at":"2025-05-12T03:43:27.517Z","avatar_url":"https://github.com/vitalik.png","language":"Python","funding_links":["https://www.buymeacoffee.com/djangoninja"],"categories":["Python","Django Utilities","开发工具\u0026框架","Web","Web APIs","\u003e 5K ⭐️"],"sub_categories":[],"readme":"\u003ca href=\"https://github.com/vitalik/django-ninja/issues/383\"\u003e\u003cimg width=\"814\" alt=\"SCR-20230123-m1t\" src=\"https://user-images.githubusercontent.com/95222/214056666-585c0479-c122-4cb3-add4-b8844088ccdd.png\"\u003e\u003c/a\u003e\n\n\n\n\u003ca href=\"https://github.com/vitalik/django-ninja/issues/383\"\u003e^ Please read ^\u003c/a\u003e\n\n\n\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://django-ninja.dev/\"\u003e\u003cimg src=\"https://django-ninja.dev/img/logo-big.png\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cem\u003eFast to learn, fast to code, fast to run\u003c/em\u003e\n\u003c/p\u003e\n\n\n![Test](https://github.com/vitalik/django-ninja/actions/workflows/test_full.yml/badge.svg)\n![Coverage](https://img.shields.io/codecov/c/github/vitalik/django-ninja)\n[![PyPI version](https://badge.fury.io/py/django-ninja.svg)](https://badge.fury.io/py/django-ninja)\n[![Downloads](https://static.pepy.tech/personalized-badge/django-ninja?period=month\u0026units=international_system\u0026left_color=black\u0026right_color=brightgreen\u0026left_text=downloads/month)](https://pepy.tech/project/django-ninja)\n\n# Django Ninja - Fast Django REST Framework\n\n**Django Ninja** is a web framework for building APIs with **Django** and Python 3.6+ **type hints**.\n\n\n **Key features:**\n\n  - **Easy**: Designed to be easy to use and intuitive.\n  - **FAST execution**: Very high performance thanks to **\u003ca href=\"https://pydantic-docs.helpmanual.io\" target=\"_blank\"\u003ePydantic\u003c/a\u003e** and **\u003ca href=\"/docs/docs/guides/async-support.md\"\u003easync support\u003c/a\u003e**.\n  - **Fast to code**: Type hints and automatic docs lets you focus only on business logic.\n  - **Standards-based**: Based on the open standards for APIs: **OpenAPI** (previously known as Swagger) and **JSON Schema**.\n  - **Django friendly**: (obviously) has good integration with the Django core and ORM.\n  - **Production ready**: Used by multiple companies on live projects (If you use django-ninja and would like to publish your feedback, please email ppr.vitaly@gmail.com).\n\n\n\n![Django Ninja REST Framework](docs/docs/img/benchmark.png)\n\n**Documentation**: https://django-ninja.dev\n\n---\n\n## Installation\n\n```\npip install django-ninja\n```\n\n\n\n## Usage\n\n\nIn your django project next to urls.py create new `api.py` file:\n\n```Python\nfrom ninja import NinjaAPI\n\napi = NinjaAPI()\n\n\n@api.get(\"/add\")\ndef add(request, a: int, b: int):\n    return {\"result\": a + b}\n```\n\n\nNow go to `urls.py` and add the following:\n\n\n```Python hl_lines=\"3 7\"\n...\nfrom .api import api\n\nurlpatterns = [\n    path(\"admin/\", admin.site.urls),\n    path(\"api/\", api.urls),  # \u003c---------- !\n]\n```\n\n**That's it !**\n\nNow you've just created an API that:\n\n - receives an HTTP GET request at `/api/add`\n - takes, validates and type-casts GET parameters `a` and `b`\n - decodes the result to JSON\n - generates an OpenAPI schema for defined operation\n\n### Interactive API docs\n\nNow go to \u003ca href=\"http://127.0.0.1:8000/api/docs\" target=\"_blank\"\u003ehttp://127.0.0.1:8000/api/docs\u003c/a\u003e\n\nYou will see the automatic interactive API documentation (provided by \u003ca href=\"https://github.com/swagger-api/swagger-ui\" target=\"_blank\"\u003eSwagger UI\u003c/a\u003e or \u003ca href=\"https://github.com/Redocly/redoc\" target=\"_blank\"\u003eRedoc\u003c/a\u003e):\n\n\n![Swagger UI](docs/docs/img/index-swagger-ui.png)\n\n## What next?\n\n - Read the full documentation here - https://django-ninja.dev\n - To support this project, please give star it on Github. ![github star](docs/docs/img/github-star.png)\n - Share it [via Twitter](https://twitter.com/intent/tweet?text=Check%20out%20Django%20Ninja%20-%20Fast%20Django%20REST%20Framework%20-%20https%3A%2F%2Fdjango-ninja.dev)\n - If you already using django-ninja, please share your feedback to ppr.vitaly@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitalik%2Fdjango-ninja","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitalik%2Fdjango-ninja","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitalik%2Fdjango-ninja/lists"}