Generators — Aquilia Documentation
Comprehensive guide and documentation for Generators in the Aquilia framework. View API reference, examples, and implementation patterns.
CLI / Generators Code Scaffolding & Generators Scaffolding utilities automatically structure workspaces, create new isolation modules, and wire up controllers from templates, reducing boilerplate code. Workspace Generator The aq init workspace command bootstraps a standardized project layout. It generates configurations, helper scripts, and base files: aq init workspace my_project --template=api Scaffold Output Structure my_project/ ├── workspace.py # Central workspace definition & configuration ├── starter.py # Landing controller welcome handler ├── requirements.txt # Project python dependencies ├── pyproject.toml # Packaging metadata ├── modules/ # Composable modules folder └── artifacts/ # Compiled route & DI schema bundles Module Scaffolding The aq add module command creates self-contained directories under modules/, appending the module configuration details automatically: aq add module billing --depends-on=users --route-prefix=/v1/billing Scaffold Output Structure modules/billing/ ├── __init__.py ├── manifest.py # Module service & controller registry manifest ├── controllers.py # Controller implementations ├── models.py # Database ORM models ├── schemas.py # Input validation contracts ├── services.py # Business service providers └── tests/ # Module test suites Controller Generator The aq generate controller command scaffolds new controller class files containing routing endpoint templates, status code returns, and lifecycle hooks: # Scaffolds CRUD endpoints for User resource aq generate controller Users --resource=User --with-lifecycle # Scaffolds simple controller aq generate controller Health --simple Scaffolding Options Option Description ))} )
Go to Homepage