persisting-theory
raw JSON → 1.0 verified Mon Apr 27 auth: no python
A Python library for registries that can autodiscover values across your project apps. Current version 1.0, release cadence unknown.
pip install persisting-theory Common errors
error ModuleNotFoundError: No module named 'persisting_theory' ↓
cause Library not installed or installed in wrong environment.
fix
Run 'pip install persisting-theory' in the correct Python environment.
Warnings
gotcha Autodiscover relies on module scanning; ensure all relevant apps/modules are imported before calling. ↓
fix Explicitly import modules in settings.py or equivalent before calling autodiscover().
Imports
- Registry
from persisting_theory import Registry - autodiscover
from persisting_theory import autodiscover
Quickstart
from persisting_theory import Registry, autodiscover
class MyRegistry(Registry):
pass
# Autodiscover registries across apps
autodiscover()
# Use registry
print(MyRegistry.registry)