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.pyapi/blog/post/views.pyapi/blog/post/permissions.pyapi/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.
- Fork the repository
- Create a feature branch
- 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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8c4e66dbdc385e915da7b4d162640f44ea10077312b7733214be4fdceca8b76
|
|
| MD5 |
dc81cdcc779cef6b99009c300073df3a
|
|
| BLAKE2b-256 |
35722f3507d488174ce0de0c1d6d3d82bf02d42c1aa52ace5ad4387d3d74c7aa
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf0f2290f2a33b50215dcf5d9eed9970da067f93b573c60a47d34baafa0b9321
|
|
| MD5 |
e59f54c6faef4ade52d0a88100f126a3
|
|
| BLAKE2b-256 |
4855df15244ca9e755d4ba9d0d5a37fe0077bb2c5c5ea84ebce0ad1427b8063f
|