This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.0.2 instead.
Reason given by maintainers: Bug
Documentation: https://django-gc.rdd-lab.com/
Source Code: https://github.com/RDDLab/Django-GC
Django-GC
Django-GC stores typed runtime settings in the database and serves them from Django's cache. Application code never reads a value through the ORM. The project owns the keys; this package is the mechanism.
Features
- Code-declared keys — categories and definitions live in Django settings and are synchronized after migrate.
- Typed values — strings, numbers, dates, arrays, choices, JSON, UUID, and optional secure secrets.
- Full cache snapshot —
get_value()never falls back to a single-row ORM read. - Stock Django Admin — edit values with standard
ModelAdminand Django's built-in change history. - Optional Celery — periodic full snapshot refresh.
- Fully typed — ships
py.typed; compatible with pyrefly and standard type checkers.
Installation
pip install django-gc
INSTALLED_APPS = [
'django_gc',
'django.contrib.admin',
# ...
]
Periodic refresh is optional:
pip install 'django-gc[celery]'
Quick start
In Django settings, set categories, keys, and the encryption key. Then migrate and read values through the service:
from enum import StrEnum
from django_gc import (
CategoryDefinition,
SettingDefinition,
SettingType,
get_value,
set_value,
)
class SettingKey(StrEnum):
MAINTENANCE_ENABLED = 'maintenance-enabled'
GLOBAL_CONFIG_CATEGORIES = [
CategoryDefinition(id=1, code='platform', name='Platform'),
]
GLOBAL_CONFIG_DEFINITIONS = [
SettingDefinition(
key=SettingKey.MAINTENANCE_ENABLED,
description='Maintenance mode',
default_value=False,
value_type=SettingType.BOOLEAN,
category_id=1,
),
]
GLOBAL_CONFIG_ENCRYPTION_KEY = 'replace-with-a-long-random-secret'
enabled = get_value(SettingKey.MAINTENANCE_ENABLED)
set_value(SettingKey.MAINTENANCE_ENABLED, True)
Documentation
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 django_gc-1.0.1.tar.gz.
File metadata
- Download URL: django_gc-1.0.1.tar.gz
- Upload date:
- Size: 29.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72b20dbab4c6d0ae45ae91fa5e17f198e742c7fe153aec2ddf39e8880530dd3a
|
|
| MD5 |
9f4e96bce7d0570bffc859885d6f9f72
|
|
| BLAKE2b-256 |
49e318006444ece6bc47d63d29d4d3cee55f52e788e1baa9325b294e9ff053d7
|
Provenance
The following attestation bundles were made for django_gc-1.0.1.tar.gz:
Publisher:
publish.yml on RDDLab/Django-GC
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_gc-1.0.1.tar.gz -
Subject digest:
72b20dbab4c6d0ae45ae91fa5e17f198e742c7fe153aec2ddf39e8880530dd3a - Sigstore transparency entry: 2566027450
- Sigstore integration time:
-
Permalink:
RDDLab/Django-GC@cf75ea2ffa5122faf9ab62377d11a7aa6fb200f4 -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/RDDLab
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
publish.yml@cf75ea2ffa5122faf9ab62377d11a7aa6fb200f4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file django_gc-1.0.1-py3-none-any.whl.
File metadata
- Download URL: django_gc-1.0.1-py3-none-any.whl
- Upload date:
- Size: 32.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fc37e4cb666930a67fd0e066e0aa674bd6549562e261b12cd0d86c71641f0ce
|
|
| MD5 |
64c5114d56953f5046e9f353dafe7258
|
|
| BLAKE2b-256 |
a8eece48a6bd1b1eb9b21d511eee2540a1b9ba6e234a54732ddcdadc6aa5af43
|
Provenance
The following attestation bundles were made for django_gc-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on RDDLab/Django-GC
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_gc-1.0.1-py3-none-any.whl -
Subject digest:
4fc37e4cb666930a67fd0e066e0aa674bd6549562e261b12cd0d86c71641f0ce - Sigstore transparency entry: 2566027573
- Sigstore integration time:
-
Permalink:
RDDLab/Django-GC@cf75ea2ffa5122faf9ab62377d11a7aa6fb200f4 -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/RDDLab
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
publish.yml@cf75ea2ffa5122faf9ab62377d11a7aa6fb200f4 -
Trigger Event:
release
-
Statement type: