Skip to main content

Django REST Framework Boilerplate Generator

Project description

drfbp

drfbp (Django REST Framework Boilerplate) is a Django app that provides powerful management commands to automate the repetitive, low-level setup needed for building APIs with Django and Django REST Framework. It is built to scale with your project — whether you're scaffolding a CRUD API, generating serializers, or extending your workflow with custom utilities.

⚡ Speed up your development.
🧱 Build smarter, not harder.
🧰 One toolbox, many commands.

✨ Features

  • ✅ Command-based interface — Easily extendable via Django management commands
  • 🔧 Boilerplate generation — Generate views, serializers, permissions, and routers in seconds
  • ⚙️ Formatted out of the box — Auto-formats with black and isort -🧩 DRF-ready — Designed for use with Django REST Framework
  • 💼 Project-friendly — Clean, modular output that fits real-world project structures
  • 📦 Installation Install from PyPI:
pip install drfbp

Or install locally for development:

pip install -e .

⚙️ Setup

To enable the included management commands, add drfbp to your Django project's INSTALLED_APPS:

# settings.py

INSTALLED_APPS = [
    ...
    "drfbp",
]

🛠 Available Commands

📌 crud — Generate REST API boilerplate for a Django model Scaffolds the full API structure for any registered model, including views, serializers, permissions, and routes.

🔄 Usage

python manage.py crud <app> <model> <path>
  • app: Django app label containing the model.
  • model: Model class name.
  • path: Output directory for the generated files.

💡 Example

python manage.py crud blog post api/blog/post

This generates:

  • api/blog/post/serializers.py
  • api/blog/post/views.py
  • api/blog/post/permissions.py
  • api/blog/post/urls.py

All files are import-ready and formatted with isort and black.

📁 Output Overview

File Description
serializers.py DRF ModelSerializer
views.py DRF ModelViewSet
permissions.py Customizable permission class
urls.py Router-based URL config

🔧 Requirements

  • Python 3.7+
  • Django 3.2+
  • Django REST Framework

🤝 Contributing

New command ideas, fixes, or improvements are always welcome.

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request

Please follow Django and Python community conventions.

🪪 License

MIT License. See LICENSE for more details.

💡 Inspiration

Born from the need to automate boilerplate in production projects, drfbp aims to give Django developers more time for logic, less time spent on setup.

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

drfbp-25.6.21.419.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

drfbp-25.6.21.419-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file drfbp-25.6.21.419.tar.gz.

File metadata

  • Download URL: drfbp-25.6.21.419.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for drfbp-25.6.21.419.tar.gz
Algorithm Hash digest
SHA256 d8c4e66dbdc385e915da7b4d162640f44ea10077312b7733214be4fdceca8b76
MD5 dc81cdcc779cef6b99009c300073df3a
BLAKE2b-256 35722f3507d488174ce0de0c1d6d3d82bf02d42c1aa52ace5ad4387d3d74c7aa

See more details on using hashes here.

File details

Details for the file drfbp-25.6.21.419-py3-none-any.whl.

File metadata

  • Download URL: drfbp-25.6.21.419-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for drfbp-25.6.21.419-py3-none-any.whl
Algorithm Hash digest
SHA256 cf0f2290f2a33b50215dcf5d9eed9970da067f93b573c60a47d34baafa0b9321
MD5 e59f54c6faef4ade52d0a88100f126a3
BLAKE2b-256 4855df15244ca9e755d4ba9d0d5a37fe0077bb2c5c5ea84ebce0ad1427b8063f

See more details on using hashes here.

Supported by

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