How ekiourk/django-tunables works
django-tunables lets a Django host declare a typed catalogue, then operators read or edit its effective values through admin, embedded panel, or REST API. Edits become atomic, versioned change sets and snapshots, with audit history and optional publishing. Management commands synchronize, import/export, inspect, and retain snapshots; schema and search support external clients and discovery. The graph emphasizes documented capabilities and relationships visible in excerpts or the README; unsampled command and API wiring is not asserted.
Main entry points: services.py Change services · views.py REST API · sync.py Catalogue sync · commands Management commands
Components 21
Catalogue and definitions
- Typed catalogue
src/tunables/catalogue.py - Catalogue registry
src/tunables/registry.py - Value types
src/tunables/types.py - Client schemas
src/tunables/schema.py
Operator interfaces
- Django admin
src/tunables/admin/__init__.py - Embedded panel
src/tunables/panel.py - Edit forms
src/tunables/forms.py - REST API
src/tunables/api/views.py - API write handling
src/tunables/api/writes.py - Definition search
src/tunables/search.py - Edit access
src/tunables/access.py
Changes and persistence
- Change services
src/tunables/services.py - History and values
src/tunables/models.py - Snapshot reader
src/tunables/reader.py - Snapshot documents
src/tunables/document.py
Operations and integration
- Catalogue sync
src/tunables/sync.py - Tags
src/tunables/tags.py - Snapshot publishers
src/tunables/publishers.py - Management commands
src/tunables/management/commands
Other components
- Django host
- External client
Connections 25
- Django host → Typed catalogue: declares
README.md - Catalogue registry → Typed catalogue: loads
src/tunables/registry.py - Typed catalogue → Value types: validates defaults
src/tunables/catalogue.py - Django admin → Edit forms: uses
src/tunables/admin/__init__.py - Embedded panel → Edit forms: builds
src/tunables/panel.py - Edit forms → Change services: applies edits
src/tunables/forms.py - REST API → API write handling: dispatches writes
src/tunables/api/views.py - API write handling → Change services: applies changes
src/tunables/api/writes.py - Django admin → Edit access: checks access
src/tunables/admin/__init__.py - Embedded panel → Edit access: checks access
src/tunables/panel.py - Change services → History and values: records versions
src/tunables/services.py - Change services → Snapshot documents: writes snapshots
src/tunables/services.py - Snapshot reader → History and values: reads snapshots
src/tunables/reader.py - Snapshot reader → Change services: gets values
src/tunables/reader.py - Catalogue sync → Catalogue registry: loads catalogue
src/tunables/sync.py - Catalogue sync → History and values: mirrors definitions
src/tunables/sync.py - Catalogue sync → Change services: writes system changes
src/tunables/sync.py - Management commands → Catalogue sync: runs sync
src/tunables/management/commands/tunables_sync.py - Management commands → Change services: imports and prunes
src/tunables/management/commands/tunables_import.py - REST API → Client schemas: serves schemas
src/tunables/api/views.py - External client → REST API: reads and edits
README.md - External client → Client schemas: renders forms
README.md - REST API → Definition search: filters definitions
src/tunables/api/views.py - Management commands → Snapshot publishers: publishes snapshots
- Snapshot publishers → External client: delivers snapshot