AquiliaServer — Aquilia Documentation
Comprehensive guide and documentation for AquiliaServer in the Aquilia framework. View API reference, examples, and implementation patterns.
AquiliaServer aquilia.server — Main server orchestration AquiliaServer is the central orchestrator that wires together every subsystem — from Aquilary manifest compilation to ASGI request handling. It is a 4,000+ line class that serves as the single entry point for the entire framework. Server DI DI Containers ASGI ASGI Adapter REG App Registry ENG Controller Engine Constructor Parameter Type Description ))} Initialization Sequence The __init__ method performs the following steps in order. Understanding this sequence is critical for debugging boot issues: Key Attributes Attribute Type Description ) : ( type )} ))} Middleware Setup The _setup_middleware() method builds the middleware stack from configuration. Middleware is added conditionally based on what integrations are enabled: Session & Auth Setup The server supports configuration for sessions using the typed SessionIntegration class: Startup & Shutdown Running the Server Production tip: Use aq serve for production deployments. It runs uvicorn with production-optimized settings (no reload, access logs, worker configuration). Use aq run for development (auto-reload enabled). Debug Mode When debug=True (via config, AQ_DEBUG=true, or RegistryMode.DEV), the server enables: • Debug error pages — ExceptionMiddleware renders rich HTML error pages with tracebacks, request details, and source code context • Verbose logging — Full request/response body logging • Relaxed validation — Missing optional providers don't cause boot failures • Auto-reload — File watcher restarts server on code changes (uvicorn --reload) Related → ASGI Adapter: How Aquilia bridges ASGI and its internal pipeline → Lifecycle: Dependency-ordered startup/shutdown coordination → MiddlewareStack: How middleware ordering works )
Go to Homepage