Pular para conteúdo

Main

lifespan(app) async

Manage the lifespan of the FastAPI application.

Parameters:

Name Type Description Default
app FastAPI

The FastAPI application instance.

required

Returns: None

Source code in api/main.py
10
11
12
13
14
15
16
17
18
19
20
@asynccontextmanager
async def lifespan(app: FastAPI):
    """Manage the lifespan of the FastAPI application.

    Args:
        app (FastAPI): The FastAPI application instance.

     Returns:
        None
    """
    pass