Home

Awesome

<h1 align="center"> Django Rest CLI ✨ </h1> <p align="center"> <img src="https://github.com/py-universe/django-rest-cli/blob/docs/assets/logo.png" width="120" height="120"> </p> <p align="center"> Scaffold your DRF project with common python packages configured, auto-generated docs, auto-generated CRUD endpoints, code linting with pre-commit hook, and more⚡🚀 </p> <p align="center"> <a href="https://github.com/pre-commit/pre-commit"> <img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white" alt="pre-commit"> </a> <a href="https://badge.fury.io/py/dr-cli" target="_blank"> <img src="https://badge.fury.io/py/dr-cli.svg" alt="PyPI version"> </a> <a href="https://github.com/py-universe/django-rest-cli/actions?query=workflow%3ATest" target="_blank"> <img src="https://github.com/py-universe/django-rest-cli/workflows/Test/badge.svg" alt="Test"> </a> </p>

What is Django Rest CLI ?

A CLI tool for rapid Rest APIs development. It abstracts the repeated aspects of building a REST API with the Django Framework by:

Demo

<img src="./assets/demo-min.gif">

Getting Started

Installation

pip install dr-cli

I highly recommend that you install this in a virtual environment.

Create a New Project

<img src="https://github.com/py-universe/django-rest-cli/blob/docs/assets/startproject.PNG">

The generated project comes with a nice Readme containing the steps for running the project

Create New Apps in your Project

<img src="https://github.com/py-universe/django-rest-cli/blob/docs/assets/createapps.PNG">

Note Make sure to add your created apps to the list of INSTALLED APPS

Generate CRUD Endpoints for your Apps

<img src="https://github.com/py-universe/django-rest-cli/blob/docs/assets/addcrud.PNG">

Note Make sure to register the URLs for each app in the top level urls.py file.

On Windows, Emojis are only supported in Windows Terminal Preview

Accessing the docs page

<img src="./assets/docs.PNG">

Motivation

I've documented my motivation for working on this tool here.

Contributing Guide

Coming soon...

Acknowledgements

In building this I re-used a few parts of these repositories in this project:

I Love this, how can I thank you Nyior?

Please let your developer friends know about this repo :) If you star this repo too I won't complain xD

Limitations

Python310 isn't supported in this project yet. We are working on it.

Licence

MIT