Django-app-parameter
Django-app-parameter lets you store application settings in the database and update them at runtime through Django admin - no deployment or restart needed. Perfect for things like site titles, email addresses, feature flags, or any configuration that business users should control.
⚠️ Migration from v2.x to v3.0
Version 3.0 introduces a simplified API. Type-specific methods have been replaced with unified get() and set():
# Before (v2.x)
value = param.int()
param.set_int(42)
title = Parameter.objects.str("BLOG_TITLE")
# After (v3.0)
value = param.get()
param.set(42)
param = Parameter.objects.get(slug="BLOG_TITLE")
title = param.get()
New feature: auto_cast parameter to convert string input to native type:
param.set("42", auto_cast=True) # Converts "42" to int for INT parameters
See CHANGELOG.md for full details.
Quick Start
Installation
pip install django-app-parameter
For encryption support (optional):
pip install django-app-parameter[cryptography]
Requirements: Python 3.10+ • Django 4.2+
Compatibility Matrix
| Python | Django 4.2 LTS | Django 5.2 LTS | Django 6.0 |
|---|---|---|---|
| 3.10 | ✅ | ✅ | ❌ |
| 3.11 | ✅ | ✅ | ❌ |
| 3.12 | ✅ | ✅ | ✅ |
| 3.13 | ✅ | ✅ | ✅ |
| 3.14 | ❌ | ✅ | ✅ |
Configuration
- Add to
INSTALLED_APPS:
INSTALLED_APPS = [
...
"django_app_parameter",
]
- Optional - make global parameters available in all templates:
TEMPLATES = [
{
...
"OPTIONS": {
"context_processors": [
...
"django_app_parameter.context_processors.add_global_parameter_context",
],
},
},
]
- Run migrations:
python manage.py migrate
- Access Django admin to create your first parameters!
Basic Usage
Reading Parameters
In Python code:
from django_app_parameter import app_parameter
# Read parameter value
title = app_parameter.BLOG_TITLE
email = app_parameter.CONTACT_EMAIL
In templates (for global parameters):
<title>{{ BLOG_TITLE }}</title>
Writing Parameters
# Update parameter value programmatically
app_parameter.BLOG_TITLE = "My New Title"
Parameter Names → Slugs
Parameters are accessed via auto-generated slugs:
"Blog Title" → BLOG_TITLE
"sender e-mail" → SENDER_E_MAIL
"##weird@Na_me" → WEIRDNA_ME
Features
Supported Types
String • Integer • Float • Boolean • URL • Email • JSON List • JSON Dict • File Path • Duration • Percentage • DateTime • Date • Time
Bulk Import/Export
Load parameters from JSON:
python manage.py dap_load --file parameters.json
Export all parameters:
python manage.py dap_dump --file backup.json
Example JSON format:
[
{"name": "Site Title", "value": "My Site", "is_global": true},
{"name": "Max Upload Size", "value": "10485760", "value_type": "INT"}
]
Use --no-update to only create new parameters without overwriting existing ones (useful in deployment scripts).
Validation
Attach validators to parameters (min/max value, length, regex, choices, etc.) - configured through Django admin or custom validators.
Encryption
Enable encryption for sensitive parameters (requires cryptography extra). Manage encryption keys with the dap_rotate_key command.
History Tracking
Enable enable_history to track all value changes with timestamps - viewable in Django admin.
📖 Read the full documentation for detailed information on all features.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for development guidelines.
Requirements for contributions:
- Format code with Ruff
- Add type hints (validated with Pyright)
- Maintain 100% test coverage
Links
License
CC0 1.0 Universal - Public Domain
Metadata
Release files for django-app-parameter 3.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django_app_parameter-3.2.0.tar.gz | 29.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_app_parameter-3.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 68.0 kB
Release files / django_app_parameter-3.2.0.tar.gz
| Download URL | django_app_parameter-3.2.0.tar.gz |
|---|---|
| Size | 29.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a69b46b407bc9b5d40b11d804276ab3789970a040ae831152f4084ab346fe151
|
|
BLAKE2b-256 checksum How to use checksums |
e99c6528ce27032d6d88e043fa8f74869dd00fec0d53a55cf38aa0ae637e491b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 26, 2026.
Transparency logRelease files / django_app_parameter-3.2.0-py3-none-any.whl
| Download URL | django_app_parameter-3.2.0-py3-none-any.whl |
|---|---|
| Size | 38.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c95c79f88eb46d84e75055daf378979c360f7e5b61089c51354edf1c58711df
|
|
BLAKE2b-256 checksum How to use checksums |
068d1c663fe70a095a661e2ff894dda05044e7ebc91bdc1dec7cb98fedbd0d48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 26, 2026.
Transparency logSecurity for django-app-parameter 3.2.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for django_app_parameter-3.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 26, 2026.
Transparency logA 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.