Skip to main content

Django Package Cookiecutter Template

Cookiecutter template for creating reusable Django packages with production-ready structure.

Prerequisites

Make sure to have the following on your host:

  • uv
  • Cookiecutter: pip install cookiecutter

Quickstart

Generate a new Django package:

uv tool install cookiecutter
cookiecutter gh:TheAbhijeet/cookiecutter-django-package

Configuration Options

Prompt Default Description
project_name my-django-package Full name of your package (kebab-case recommended)
package_name Auto-generated Python importable name (auto-converted from project_name)
example_project_name example_project Name of the example_project Django project for testing
author_name Your Name Your name for package metadata
author_email your.email@example.com Your email for package metadata
version 0.1.0 Initial package version (semantic versioning)
description A reusable Django application. Short description for PyPI
license MIT Choose license: MIT, BSD, ISC, Apache-2.0, or GPL-3.0
python_env uv Package manager: uv (fast) or Poetry
include_drf False Include Django REST Framework serializers and viewsets
include_celery False Include Celery configuration for async tasks
include_admin_templates False Include custom Django admin templates
include_templates False Include templates/static folders for frontend assets
image

Set up the generated project:

cd <project_slug>
uv sync
uv run python example_project/manage.py migrate
uv run python example_project/manage.py runserver

Features

  • src/ Layout - Prevents accidental imports from project root
  • Demo Project - Ready-to-run Django project for testing
  • PyPI Ready - pyproject.toml configured for building
  • CI/CD - GitHub Actions workflow included
  • Testing - pytest with Django integration
  • Documentation - Sphinx-ready docs folder

Template Structure

cookiecutter-django-package/
├── cookiecutter.json
├── extensions.py
├── hooks/
├── {{cookiecutter.project_name}}/
│   ├── src/
│   ├── tests/
│   ├── example_project/
│   ├── docs/
│   └── pyproject.toml
├── tests/
└── pyproject.toml

Development (Template)

Clone and set up the template itself:

git clone https://github.com/TheAbhijeet/cookiecutter-django-package.git
cd cookiecutter-django-package
uv sync

Run template tests:

uv run pytest

License

MIT

Metadata

Release files for cookiecutter-django-package 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cookiecutter-django-package 0.1.0
File Size Uploaded Provenance Actions
cookiecutter_django_package-0.1.0.tar.gz 71.5 kB Without provenance Details for cookiecutter_django_package-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cookiecutter-django-package 0.1.0
File Interpreter ABI Platform Actions
cookiecutter_django_package-0.1.0-py3-none-any.whl Python 3 none any Details for cookiecutter_django_package-0.1.0-py3-none-any.whl

Total release size: 74.4 kB

Release files / cookiecutter_django_package-0.1.0.tar.gz

Download URL cookiecutter_django_package-0.1.0.tar.gz
Size 71.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5a8a95066d5960a96b5bbdf23b60a74e39faabee0d58a88d049067f7383aee93
BLAKE2b-256 checksum
How to use checksums
c860a26c933b05eba2a41732a953f38144c655c9343d9f3c658606501312cb5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / cookiecutter_django_package-0.1.0-py3-none-any.whl

Download URL cookiecutter_django_package-0.1.0-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63c00b8ef939f92c365984558cfe3987e78e41630d6ee8c1c8176c4d479085e8
BLAKE2b-256 checksum
How to use checksums
cf44cca73a791d34030e9e2a775fd1b1e0479a54f3fbda7bb58af12f3ec14c4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Security for cookiecutter-django-package 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page