Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dr_scaffold-1.4.3.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

dr_scaffold-1.4.3-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file dr_scaffold-1.4.3.tar.gz.

File metadata

  • Download URL: dr_scaffold-1.4.3.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.5

File hashes

Hashes for dr_scaffold-1.4.3.tar.gz
Algorithm Hash digest
SHA256 0223876d719ca42f6d154f1f9a204c25f327b7de0e9d505bbdf16a43481cba4c
MD5 257250c0f4cba9b4007d2e5fe265f324
BLAKE2b-256 b675008f2786eba906f5216528f9d80cb7456841870cb97f04043db0de722286

See more details on using hashes here.

File details

Details for the file dr_scaffold-1.4.3-py3-none-any.whl.

File metadata

  • Download URL: dr_scaffold-1.4.3-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.5

File hashes

Hashes for dr_scaffold-1.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b5b081bfa25cd8e94cf8d94710220440b90d337e56144da4d6e358bcc4247b3b
MD5 5eedfb01658285d1db096efd72a9c24c
BLAKE2b-256 01d7082a2e507698c9e1af65ee94c5d3b37e12ccab1108efd02435a420a0c99c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page