Skip to content

Conversation

@Michele0303
Copy link

This updates the FastAPI tutorial examples to use the modern
FastAPI lifespan API instead of the deprecated startup event.

The on_startup() function is intentionally kept as a plain helper
and reused by the lifespan context manager, so that existing tutorial
tests can continue to call it directly without relying on the ASGI
lifecycle.

No behavioral changes are introduced, and all tests pass.

Replace deprecated FastAPI startup events in tutorial examples with lifespan context managers, keeping on_startup() as a helper for tests and documentation consistency.
@github-actionsgithub-actionsbot added the docs Improvements or additions to documentation label Dec 23, 2025
@rasifabdulrazak
Copy link

1

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsImprovements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Michele0303@rasifabdulrazak