Configuration — Aquilia Documentation
Comprehensive guide and documentation for Configuration in the Aquilia framework. View API reference, examples, and implementation patterns.
Unified Storage / Configuration Storage Configuration A complete guide to configuring unified storage backends inside your Aquilia workspace using typed configuration dataclasses. Integration Configuration Styles Aquilia supports two styles of declaring subsystem integrations within workspace.py: the legacy builder-class style and the modern typed-dataclass style. Modern Style: Composed Dataclasses (Recommended) Construct the StorageIntegration class directly. This ensures compile-time validation, IDE type hinting, and strict parameter checking. # workspace.py from aquilia import Workspace, Module from aquilia.integrations import StorageIntegration from aquilia.storage.configs import LocalConfig, S3Config workspace = ( Workspace("myapp") .module(Module("core")) .integrate(StorageIntegration( default="local", backends= )) ) Legacy Style: Static Integration Builders The legacy .storage() or Integration.storage() helper delegates to the modern StorageIntegration under the hood. Avoid this in new projects. # workspace.py (Legacy) from aquilia import Workspace from aquilia.storage import LocalConfig workspace = ( Workspace("myapp") .storage( default="local", backends= ) ) Warning: The legacy static helper .storage() is deprecated and will be removed in a future release. Migrate to direct constructor calls using StorageIntegration. Backend Configuration Options LocalConfig Configures the local disk backend. Inherits from StorageConfig. Attribute Type Default Description ))} MemoryConfig Configures ephemeral in-memory storage, useful for mocking disk I/O in test suites. Attribute Type Default Description ))} S3Config Configures AWS S3 and compatible storage layers. Attribute Type Default Description ))} CompositeConfig Configures composite storage to route calls dynamically to other backends. Attribute Type Default Description ', 'Sub-backend dictionary mappings.'], ['rules', 'dict', ' ', 'Glob patterns mapped to target backend aliases.'], ['fallback', 'str', '"default"', 'Alias to route requests to when no rules match.'], ].map(([attr, type, defVal, desc], i) => ( ))} Module Manifest & ComponentRef Instead of declaring component imports as bare string paths, Aquilia v2 recommends using the ComponentRef class inside manifest.py. This offers typed metadata checks during boot scans. # modules/uploads/manifest.py from aquilia import AppManifest, ComponentRef, ComponentKind manifest = AppManifest( name="uploads", controllers=[ # Controller component references ComponentRef( class_path="modules.uploads.controllers:FilesController", kind=ComponentKind.CONTROLLER ) ], services=[] ) )
Go to Homepage