Skip to main content

Schema-driven, database-backed runtime configuration app for Django

Project description

django-sysconfig

PyPI version Python versions CI License

Schema-driven, database-backed runtime configuration for Django.

Define typed config fields in code. Store values in the database. Edit everything live through a built-in admin UI — without touching settings.py.

django-sysconfig demo


Install

pip install django-sysconfig
# settings.py
INSTALLED_APPS = [
    "django_sysconfig",   # add at the top
    ...
]
python manage.py migrate

Quick example

# myapp/sysconfig.py
from django_sysconfig.registry import register_config, Section, Field
from django_sysconfig.frontend_models import BooleanFrontendModel, IntegerFrontendModel
from django_sysconfig.validators import RangeValidator

@register_config("myapp")
class MyAppConfig:
    class General(Section):
        label = "General"

        maintenance_mode = Field(BooleanFrontendModel, label="Maintenance Mode", default=False)
        max_items = Field(IntegerFrontendModel, label="Max Items", default=100,
                          validators=[RangeValidator(min_value=1, max_value=10_000)])
# anywhere in your project
from django_sysconfig.accessor import config

if config.get("myapp.general.maintenance_mode"):
    return HttpResponse("Down for maintenance.", status=503)

Staff can toggle maintenance_mode at /admin/config/ — no code change, no redeploy.


Documentation

Full guides, API reference, and examples are in the docs.


Contributing

See CONTRIBUTING.md. Issues and pull requests are welcome.


Security

Please do not open a public issue for security vulnerabilities. Report them privately via GitHub Security Advisories.

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

django_sysconfig-1.1.0.tar.gz (47.0 kB view details)

Uploaded Source

Built Distribution

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

django_sysconfig-1.1.0-py3-none-any.whl (42.9 kB view details)

Uploaded Python 3

File details

Details for the file django_sysconfig-1.1.0.tar.gz.

File metadata

  • Download URL: django_sysconfig-1.1.0.tar.gz
  • Upload date:
  • Size: 47.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for django_sysconfig-1.1.0.tar.gz
Algorithm Hash digest
SHA256 48dcfa445bdc9e80557890744f4bb9e0c33307d585d086867e876bcf5a36da28
MD5 175578b4e5c4d8dc3b6f1ca084bbf71a
BLAKE2b-256 a54649c79cf29ad9e80e5c881c5905c7c1654646f4c092a8bb87ad118c86978c

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_sysconfig-1.1.0.tar.gz:

Publisher: release.yml on krishnamodepalli/django-sysconfig

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_sysconfig-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_sysconfig-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 275d93cde7daebd7a03f762f54958eb1ecb8fd94f4b506c56ba77e0c4401adb6
MD5 df207e29ef5372fcd42b3cf53c40dd3f
BLAKE2b-256 44ba48e633587927bd6b15478749535d8b9d1ddf9cf7e54b177b7cebdc46de0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_sysconfig-1.1.0-py3-none-any.whl:

Publisher: release.yml on krishnamodepalli/django-sysconfig

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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