{"id":37618392,"url":"https://github.com/freemindcore/django-api-framework","last_synced_at":"2026-01-16T10:34:56.968Z","repository":{"id":60579836,"uuid":"543691741","full_name":"freemindcore/django-api-framework","owner":"freemindcore","description":"Async CRUD API with Zero coding.  Easy and fast API framework based on Django-Ninja-Extra, inspired by NestJS-CRUD. ","archived":false,"fork":false,"pushed_at":"2023-11-22T08:57:06.000Z","size":1091,"stargazers_count":16,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-28T10:24:31.875Z","etag":null,"topics":["api","crud-api","django","django-api","django-api-framework","django-crud","django-easy-api","django-ninja","django-ninja-extra","python","python-async","rest","rest-api","restful"],"latest_commit_sha":null,"homepage":"","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/freemindcore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-30T16:31:25.000Z","updated_at":"2025-06-03T02:12:23.000Z","dependencies_parsed_at":"2023-02-15T16:55:36.102Z","dependency_job_id":null,"html_url":"https://github.com/freemindcore/django-api-framework","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/freemindcore/django-api-framework","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freemindcore%2Fdjango-api-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freemindcore%2Fdjango-api-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freemindcore%2Fdjango-api-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freemindcore%2Fdjango-api-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/freemindcore","download_url":"https://codeload.github.com/freemindcore/django-api-framework/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freemindcore%2Fdjango-api-framework/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","crud-api","django","django-api","django-api-framework","django-crud","django-easy-api","django-ninja","django-ninja-extra","python","python-async","rest","rest-api","restful"],"created_at":"2026-01-16T10:34:56.293Z","updated_at":"2026-01-16T10:34:56.956Z","avatar_url":"https://github.com/freemindcore.png","language":"Python","readme":"[![PyPI version](https://badge.fury.io/py/django-api-framework.svg)](https://badge.fury.io/py/django-api-framework)\n[![PyPI version](https://img.shields.io/pypi/v/django-api-framework.svg)](https://pypi.python.org/pypi/django-api-framework)\n\n![Test](https://github.com/freemindcore/django-api-framework/actions/workflows/test_full.yml/badge.svg)\n[![Codecov](https://img.shields.io/codecov/c/gh/freemindcore/django-api-framework)](https://codecov.io/gh/freemindcore/django-api-framework)\n[![Downloads](https://pepy.tech/badge/django-api-framework/month)](https://pepy.tech/project/django-api-framework)\n\n[![PyPI version](https://img.shields.io/pypi/pyversions/django-api-framework.svg)](https://pypi.python.org/pypi/django-api-framework)\n[![PyPI version](https://img.shields.io/pypi/djversions/django-api-framework.svg)](https://pypi.python.org/pypi/django-api-framework)\n\n\n# Easy CRUD API Framework\n\n- Zero code for a full CRUD API: Automatic and configurable, inspired by [NextJs-Crud](https://github.com/nestjsx/crud).\n  - Async CRUD API with Django RBAC security protection\n  - Prefetch and retrieve all m2m fields if configured\n  - Recursively retrieve all FK/OneToOne fields if configured\n  - Excluding fields you do not want, or define a list of sensitive fields of your choice\n- Pure class based [Django-Ninja](https://github.com/vitalik/django-ninja) APIs: thanks to [Django-Ninja-Extra](https://github.com/eadwinCode/django-ninja-extra)\n- Domain/Service/Controller Base Structure: for better code organization.\n- Base Permission/Response/Exception Classes: and some handy features to help your API coding easier.\n\n```\nDjango-Ninja features:\n\n  Easy: Designed to be easy to use and intuitive.\n  FAST execution: Very high performance thanks to Pydantic and async support.\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\nPlus Extra:\n  Class Based: Design your APIs in a class based fashion.\n  Permissions: Protect endpoint(s) at ease with defined permissions and authorizations at route level or controller level.\n  Dependency Injection: Controller classes supports dependency injection with python Injector or django_injector. Giving you the ability to inject API dependable services to APIController class and utilizing them where needed\n```\n\n## Install\n`pip install django-api-framework`\n\nThen add \"easy\" to your django INSTALLED_APPS:\n\n```\n[\n    ...,\n    \"easy\",\n    ...,\n]\n```\n\n## Usage\n### Get all your Django app CRUD APIs up and running in \u003c 1 min\nIn your Django project next to urls.py create new apis.py file:\n```\nfrom easy.main import EasyAPI\n\napi_admin_v1 = EasyAPI(\n    urls_namespace=\"admin_api\",\n    version=\"v1.0.0\",\n)\n\n# Automatic Admin API generation\napi_admin_v1.auto_create_admin_controllers()\n```\nGo to urls.py and add the following:\n```\nfrom django.urls import path\nfrom .apis import api_admin_v1\n\nurlpatterns = [\n    path(\"admin/\", admin.site.urls),\n    path(\"api_admin/v1/\", api_admin_v1.urls),  # \u003c---------- !\n]\n```\nNow go to http://127.0.0.1:8000/api_admin/v1/docs\n\nYou will see the automatic interactive API documentation (provided by Swagger UI).\n![Auto generated APIs List](https://github.com/freemindcore/django-api-framework/blob/fae8209a8d08c55daf75ac3a4619fe62b8ef3af6/docs/images/admin_apis_list.png)\n\n\n### Boilerplate Django project\nA boilerplate Django project for quickly getting started, and get production ready easy-apis with 100% test coverage UP and running:\nhttps://github.com/freemindcore/django-easy-api\n\n![Auto generated APIs - Users](https://github.com/freemindcore/django-api-framework/blob/9aa26e92b6fd79f4d9db422ec450fe62d4cd97b9/docs/images/user_admin_api.png)\n\n\n## Thanks to your help\n**_If you find this project useful, please give your stars to support this open-source project. :) Thank you !_**\n\n\n\n\n\n## Advanced Usage\nIf `CRUD_API_ENABLED_ALL_APPS` is set to True (default), all app models CRUD apis will be generated.\nApps in the `CRUD_API_EXCLUDE_APPS` list, will always be excluded.\n\nIf `CRUD_API_ENABLED_ALL_APPS` is set to False, only apps in the `CRUD_API_INCLUDE_APPS` list will have CRUD apis generated.\n\nAlso, configuration is possible for each model, via APIMeta class:\n- `generate_crud`:      whether to create crud api, default to True\n- `model_exclude`:      fields to be excluded in Schema\n- `model_fields`:       fields to be included in Schema, default to `\"__all__\"`\n- `model_join`:         prefetch and retrieve all m2m fields, default to False\n- `model_recursive`:    recursively retrieve FK/OneToOne fields, default to False\n- `sensitive_fields`:   fields to be ignored\n\nExample:\n```\nclass Category(TestBaseModel):\n    title = models.CharField(max_length=100)\n    status = models.PositiveSmallIntegerField(default=1, null=True)\n\n    class APIMeta:\n        generate_crud = True\n        model_fields = [\"field_1\", \"field_2\",] # if not configured default to \"__all__\"\n        model_join = True\n        model_recursive = True\n        sensitive_fields = [\"password\", \"sensitive_info\"]\n```\n\n### Adding CRUD APIs to a specific API Controller\nBy inheriting `CrudAPIController` class, CRUD APIs can be added to any API controller.\nConfiguration is available via `APIMeta` inner class in your Controller, same as the above `APIMeta` inner class defined in your Django models.\n\nExample:\n\n```\n@api_controller(\"event_api\", permissions=[AdminSitePermission])\nclass EventAPIController(CrudAPIController):\n    def __init__(self, service: EventService):\n        super().__init__(service)\n\n    class APIMeta:\n        model = Event # django model\n        generate_crud = True # whether to create crud api, default to True\n        model_fields = [\"field_1\", \"field_2\",] # if not configured default to \"__all__\"\n        model_join = True\n        model_recursive = True\n        sensitive_fields = [\"password\", \"sensitive_info\"]\n\n```\nPlease check tests/demo_app for more examples.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreemindcore%2Fdjango-api-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreemindcore%2Fdjango-api-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreemindcore%2Fdjango-api-framework/lists"}