Expanding Your Project¶
The add command allows you to add new triggers to an existing project while maintaining the Blueprint structure. It automatically handles trigger registration in function_app.py.
The add Command¶
Use the add command to append new function modules to your project root.
When you run this command, the CLI:
1. Creates a new Blueprint file in app/functions/.
2. Creates a unit test in tests/.
3. Imports and registers the new Blueprint in function_app.py.
Examples¶
Add a secondary HTTP endpoint to your API:
Add a timer trigger to an existing project:
Add a queue listener to handle background tasks:
Dry Run¶
Use the --dry-run flag to preview which files will be created and how function_app.py will be modified before making any changes.
Development Workflow¶
- Add Trigger: Run the
addcommand to generate the boilerplate. - Implement Logic: Create a corresponding service file in
app/services/and write your core business rules there. - Update Schemas: If needed, define new request/response models in
app/schemas/. - Add Tests: Update the generated test file in
tests/to verify your new function.
What's Next?¶
Once your project is ready, follow the Deploying guide to push it to Azure.