Application composition
Lifecycle beans start by phase, then creation order, after the beans they depend on.
- With FastAPI and SQLAlchemy alone, your team builds
- An application-wide model from FastAPI dependencies, lifespan hooks, configuration, and optional integrations.
- pyfly provides
- Component discovery, conditional assembly, typed configuration, and ordered startup and shutdown in the application’s async context.
How it works
ApplicationContext evaluates profiles and conditions, registers your beans before the framework’s defaults, and then starts lifecycle infrastructure.
Declare your own bean to replace a default.

