-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Add an option in the project creation flow to enable async setup.
During the CLI prompts, users should be asked whether they want to generate a project with async support or the regular sync setup.
By default, the project should remain synchronous, but users can opt-in for async when prompted.
Expected Behavior
When running:
fastapi-create-projectThe CLI should include a prompt like:
Do you want to use async setup? (y/N):
If the user selects yes, generate the project using:
sqlalchemy.ext.asyncio(create_async_engine,AsyncSession,async_sessionmaker)- Async-compatible database drivers (
asyncpg,aiosqlite) - Async CRUD operations and routes using
async defandawait
If the user selects no, generate the current synchronous setup.
Implementation Notes
- Add a new prompt in the CLI workflow (
questionary/click/ whichever CLI library used). - Introduce a flag internally (e.g.
use_async=True|False). - Adjust database and CRUD templates accordingly.
- Update dependencies to install async drivers only if async setup is chosen.
- Update README and generated project docs.
Acceptance Criteria
- CLI prompts user whether to enable async setup.
- Default behavior remains synchronous (if user presses Enter).
- Async setup scaffolds correctly when chosen.
- Async drivers installed conditionally.
- Documentation updated.
Metadata
Metadata
Assignees
Labels
No labels