{"id":13765951,"url":"https://github.com/py-universe/django-rest-cli","last_synced_at":"2025-12-30T16:57:58.156Z","repository":{"id":39664242,"uuid":"483978629","full_name":"py-universe/django-rest-cli","owner":"py-universe","description":"Scaffold your Django Rest(DRF) projects faster with DR-CLI⚡🚀","archived":false,"fork":false,"pushed_at":"2022-06-11T17:45:37.000Z","size":319,"stargazers_count":117,"open_issues_count":1,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-16T00:49:11.357Z","etag":null,"topics":["developer-tool","django","python","rest-api","tooling"],"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/py-universe.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-04-21T08:59:25.000Z","updated_at":"2024-10-04T20:13:13.000Z","dependencies_parsed_at":"2022-08-28T08:00:32.285Z","dependency_job_id":null,"html_url":"https://github.com/py-universe/django-rest-cli","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/py-universe%2Fdjango-rest-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/py-universe%2Fdjango-rest-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/py-universe%2Fdjango-rest-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/py-universe%2Fdjango-rest-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/py-universe","download_url":"https://codeload.github.com/py-universe/django-rest-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224964519,"owners_count":17399433,"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":["developer-tool","django","python","rest-api","tooling"],"created_at":"2024-08-03T16:00:49.572Z","updated_at":"2025-12-13T23:16:38.896Z","avatar_url":"https://github.com/py-universe.png","language":"Python","readme":"\u003ch1 align=\"center\"\u003e\n  Django Rest CLI ✨\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/py-universe/django-rest-cli/blob/docs/assets/logo.png\" width=\"120\" height=\"120\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n   Scaffold your DRF project with common python packages configured, auto-generated docs, auto-generated CRUD endpoints, code linting with pre-commit hook, and more⚡🚀\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/pre-commit/pre-commit\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white\" alt=\"pre-commit\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://badge.fury.io/py/dr-cli\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://badge.fury.io/py/dr-cli.svg\" alt=\"PyPI version\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/py-universe/django-rest-cli/actions?query=workflow%3ATest\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://github.com/py-universe/django-rest-cli/workflows/Test/badge.svg\" alt=\"Test\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n## What is Django Rest CLI ?\nA CLI tool for _rapid_ Rest APIs development. It abstracts the repeated aspects of building a REST API with the Django Framework by:\n\n- Allowing you start your project from one of three templates. Each template comes with features you'd most likely be setting up yourself already configured for you.\n\n- Allowing you define your models and have this tool generate CRUD endpoints for each model defined.\nFor example, if you define a model, **Product** in your `models.py` file, this tool could generate a _GET /products POST /products PUT /products/\u003cproduct_id\u003e_ etc. endpoints for that model.\n\n- Allowing you create all the apps in your project at once, if you know them before hand.\n\n\n## Demo\n\u003cimg src=\"./assets/demo-min.gif\"\u003e\n\n## Getting Started\n\n### Installation\n```pip install dr-cli```\n\nI highly recommend that you install this in a virtual environment.\n\n### Create a New Project\n- Run ```dr-cli startproject project_name``` to start a new DRF project.\n\n- You'd be prompted to start your project from one of three templates: **Basic, Medior, and Advanced** templates. Learn more about what each template comes bundled with [here](https://github.com/py-universe/django-rest-cli/blob/docs/templatesInfo.md).\n\n- On selecting one of the templates your project will then be created. Git will be initialized in your project, and all project dependencies installed as shown in the image below:\n\n\u003cimg src=\"https://github.com/py-universe/django-rest-cli/blob/docs/assets/startproject.PNG\"\u003e\n\nThe generated project comes with a nice Readme containing the steps for running the project\n\n\n### Create New Apps in your Project\n- Run ```dr-cli startapps todo me-nu user``` to create multiple Django apps in your project. Where `todo me-nu user` are your app names.\n\n- Running the above command will create all your apps. Name validations would also be performed as shown in the image below:\n\n\u003cimg src=\"https://github.com/py-universe/django-rest-cli/blob/docs/assets/createapps.PNG\"\u003e\n\n**Note** Make sure to add your created apps to the list of INSTALLED APPS\n\n\n### Generate CRUD Endpoints for your Apps\n- Run ```dr-cli addcrud memo user``` to create CRUD endpoints for the models defined in the specified apps. \n\n- Running the above command would return a nice looking feedback as shown in the image below:\n\n\u003cimg src=\"https://github.com/py-universe/django-rest-cli/blob/docs/assets/addcrud.PNG\"\u003e\n\n**Note** Make sure to register the `URLs` for each app in the top level `urls.py` file.\n\nOn Windows, Emojis are only supported in [Windows Terminal Preview](https://www.microsoft.com/en-us/p/windows-terminal-preview/9n8g5rfz9xk3?activetab=pivot:overviewtab)\n\n### Accessing the docs page\n- Run `python manage.py runserver` to fire up your local development server, and point your browser to `http://localhost:8000/api/v1/docs` to view the auto-generated docs page shown in the image below:\n\n\u003cimg src=\"./assets/docs.PNG\"\u003e\n\n\n## Motivation\nI've documented my motivation for working on this tool [here](https://dev.to/nyior/dr-cli-a-flexible-cookie-cutter-and-crud-endpoints-generator-for-django-2nlb).\n\n\n## Contributing Guide\nComing soon... \n\n\n## Acknowledgements\nIn building this I re-used a few parts of these repositories in this project:\n- [django-classy-start](https://github.com/mfonism/django-classy-start)\n- [dr-scaffold](https://github.com/Abdenasser/dr_scaffold)\n\n\n## I Love this, how can I thank you Nyior?\nPlease let your developer friends know about this repo :) If you star this repo too I won't complain xD\n\n## Limitations\nPython310 isn't supported in this project yet. We are working on it.\n\n\n## Licence\nMIT\n","funding_links":[],"categories":["Python","Packages"],"sub_categories":["Other"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpy-universe%2Fdjango-rest-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpy-universe%2Fdjango-rest-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpy-universe%2Fdjango-rest-cli/lists"}