RuntimeRegistry — Aquilia Documentation
Comprehensive guide and documentation for RuntimeRegistry in the Aquilia framework. View API reference, examples, and implementation patterns.
AQUILARY / RUNTIME REGISTRY Runtime Registry & Discovery The RuntimeRegistry class compiles the static module graph metadata into a live application server state, performing package discovery, lazily importing controllers, and building DI containers. Auto-Discovery Phases When calling perform_autodiscovery(), the registry scans modules. "} recursively up to a depth of 5, identifying and importing classes matching predicate rules: 1. Controller Scanning Discovers classes whose names end with "Controller" or that directly inherit from Controller . 2. Service Scanning Discovers dependency injection services whose names end with "Service" or declare the __di_scope__ attribute. 3. Socket Controllers Scans for classes decorated with @Socket or whose names end with "SocketController". 4. Tasks and Models Imports tasks.py to trigger background task registrations, and scans database models to catalog schemas. Bootstrapping from aquilia.aquilary import RuntimeRegistry # 1. Instantiate runtime registry from compiled metadata runtime = RuntimeRegistry.from_metadata(registry_meta, config) # 2. Perform autodiscovery package scan (depth=5) runtime.perform_autodiscovery() # 3. Import controllers and build the ASGI route tables runtime.compile_routes() Manifest System Fingerprinting )
Go to Homepage