Component Interactions¶
Edgy keeps a relatively small API surface, but internally multiple components collaborate closely.
This page maps those interactions so you can reason about runtime behavior and extension points.
What¶
The core runtime components are:
EdgySettingsedgy.monkay.instanceRegistryModel/QuerySetDatabaseobjects (default + optionalextra)- signals and model callbacks
Why¶
This map helps when:
- wiring custom startup flows,
- introducing extensions/preloads,
- debugging model registration, schema operations, or query behavior.
How¶
graph TD
A["EdgySettings"] --> B["Monkay instance"]
B --> C["Registry"]
C --> D["Models / Metadata"]
D --> E["Model.query -> QuerySet"]
E --> F["Database (main/extra)"]
F --> G["Rows -> Model instances"]
G --> H["Signals / callbacks"]
Settings to instance¶
Settings are loaded through EDGY_SETTINGS_MODULE (or defaults), then used by Monkay for preloads/extensions.
See Settings.
Instance to registry¶
The active instance provides the runtime registry and optional app/storages.
Registry to models¶
Models register against a registry and contribute SQLAlchemy metadata, including schema behaviors and registry callbacks.
Models to QuerySet¶
Model managers create QuerySets, QuerySets compile/execute SQL, and results become model instances.
See Queries.
Result hooks¶
Signals and related hooks run on write paths (save/update/delete/migrate).
See Signals.
Example¶
If you are adding a custom extension:
- define extension + preload settings in your custom
EdgySettings, - ensure the app/instance path is preloadable for CLI/runtime commands,
- validate query lifecycle using
edgy shelland migration commands.
See CLI Commands and Migrations.