a Django package for scaffolding django rest apis using cli
Project description
Overview
This library will help you to scaffold full Restful API Resources in seconds using only one command:
$ python manage.py dr_scaffold blog Post body:textfield author:foreignkey:Author
🎉 Your RESTful Post api resource is ready 🎉
models.py with Models and fields generated by the CLI ⚡
admin.py with Models registered and ready ⚡
views.py with appropriate ViewSets ready⚡
urls.py with appropriate URLs ready.⚡
serializers.py with Model Serializers ready ⚡
and more …
Installation and usage
For a detailed guide read scaffold django apis like a champion
This library assumes that you have setup your project with Django Rest Framework. if not, please refer to this guide
Install dr_scaffold package :
$ pip install dr-scaffold
Add dr_scaffold to your INSTALLED_APPS like this:
INSTALLED_APPS = [
...
'dr_scaffold'
]
Add CORE_FOLDER and API_FOLDER to your settings.py include a forward slash at the end of each:
CORE_FOLDER = "my_core_folder/" # you can leave them empty
API_FOLDER = "my_api_folder/" # or set them to be the same
Enjoy 🎉
Supported field types
We support most of django field types.
TODO
add an option to include swagger documentation
handle DRF ViewSets using Mixins
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for dr_scaffold-1.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58316ee15d14b38e3260562579458d92cdfd1daf2b7299300f59884970dda65c |
|
MD5 | 81270ca598c404b2ea0a6e538f3ad46e |
|
BLAKE2b-256 | 44e1d65d444a90a5780775522153757a20603a4060b2510c5acc72162f15e0c4 |