Feature flags for Django projects.
Project description
django-knobs
Library for dynamic settings / feature flags that can be changed at runtime without restarting the application from Django admin panel.
pip install django-knobs
Setup
1. Add to INSTALLED_APPS:
INSTALLED_APPS = [
...
"knobs",
]
2. Run migrations:
python manage.py migrate
3. Define your config values in settings.py:
from knobs import Knob
KNOBS_CONFIG = {
"MAX_LOGIN_ATTEMPTS": Knob(default=5, help_text="Max failed logins before lockout", category="auth"),
"FEATURE_NEW_UI": Knob(default=False, help_text="Enable redesigned UI", category="features"),
"API_TIMEOUT": Knob(default=30.0, help_text="Outbound request timeout (seconds)", category="api"),
"WELCOME_MSG": Knob(default="Hello!", help_text="Welcome banner text", category="general"),
}
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
django_knobs-0.0.1.tar.gz
(8.7 kB
view details)
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 django_knobs-0.0.1.tar.gz.
File metadata
- Download URL: django_knobs-0.0.1.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aada266cbb05cf5e18f3e5856f27f6378f5e2758de84b1cdc6e7110c303293dc
|
|
| MD5 |
eac5cce7580a63855fb53075a8ed6611
|
|
| BLAKE2b-256 |
e9587e7c8d3a8e71b1bab19fb61c1a835e4ee235851d34ef1c2d97dea08ee2ed
|
File details
Details for the file django_knobs-0.0.1-py3-none-any.whl.
File metadata
- Download URL: django_knobs-0.0.1-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e193571f91a9ac61c6b41e07eef7ea11b422d2976b22674b097b6de645dd6e1
|
|
| MD5 |
ef08fa68099f925986cf1d70094d7452
|
|
| BLAKE2b-256 |
a35e2b61d43825bd1c33398b6dcc1e4edfe448b05f0721e081095bbb258dca15
|