Subsystems — Aquilia Documentation
Comprehensive guide and documentation for Subsystems in the Aquilia framework. View API reference, examples, and implementation patterns.
CLI / Subsystem Commands Subsystem Diagnostics The Aquilia CLI provides sub-commands to diagnose, inspect, and flush resources for specific modules: Cache, Mail, and i18n Translations. aq cache Commands to introspect active cache adapters and clear keys: aq cache status: Logs the current cache hits/misses statistics, configured backend (Redis, Memcached, SQLite, Memory), and pool size. aq cache keys: Lists active keys. Supports pattern-based glob matching (e.g. aq cache keys "users:*"). aq cache clear: Flushes all active keys or matching patterns. # Clear cached data matching pattern aq cache clear --pattern="products:*" aq mail Validates mail configurations and tests connections to SMTP servers: aq mail status: Displays the mail provider settings (SMTP, SendGrid, Mailgun) and verifies active authentication credentials. aq mail send: Dispatches a test email to verify correct connection routing. # Send a diagnostic test email aq mail send --to=admin@my-domain.com --subject="Test" --body="OK" aq contracts Developer tooling for the Contracts subsystem. Added in v1.3.5. aq contracts stubs: Emits .pyi type stubs next to each named module, so mypy and pyright can see Contract fields. A Contract builds its fields at class-body evaluation and serves them through __getattr__, both invisible to a static analyser. # Write myapp/contracts.pyi aq contracts stubs myapp.contracts # Several modules at once aq contracts stubs myapp.users.contracts myapp.orders.contracts # CI gate: exit non-zero if a stub is missing or stale aq contracts stubs myapp.contracts --check Flags: --check reports staleness without writing; --path sets the directory prepended to sys.path before importing (default: current directory). Commit the generated stubs and keep them honest with --check in CI. Generation is deterministic, so regenerating unchanged input is a byte-identical no-op and the check cannot fail at random. Anything that cannot be typed faithfully is emitted as Any and named in the output, so a lost annotation is reported rather than silently weakening the module's types. See Contracts for the field types each facet produces. aq i18n Coordinates localization translation catalogs, scanning files and compiling formats: aq i18n extract: Scans controller routes, Jinja templates, and validation schemas, extracting translatable strings into `.pot` templates. aq i18n compile: Compiles human-readable `.po` localization catalogs into binary `.mo` catalog mappings for fast lookup. # Compile language catalogs aq i18n compile )
Go to Homepage