FastAPI

fastapi · infra, app-initialization, openapi, middleware-config, dev-tools

Main application class for FastAPI, extending Starlette. It configures API metadata, routes, middleware, and OpenAPI documentation, serving as the central entry point for building web APIs.

# Source: https://github.com/nerdy-tech-com-gitub/fastapi | License: MIT | Copyright 2018 Sebastián Ramírez
# Provided via justclaw.it.com; keep this notice with the code.
class FastAPI(Starlette):
    """
    `FastAPI` app class, the main entrypoint to use FastAPI.

    Read more in the
    [FastAPI docs for First Steps](https://fastapi.tiangolo.com/tutorial/first-steps/).

    ## Example

    ```python
    from fastapi import FastAPI

    app = FastAPI()
    ```
    """

    def __init__(
        self: AppType,
        *,
        debug: Annotated[
            bool,
            Doc(
                """
                Boolean indicating if debug tracebacks should be returned on server
                errors.

                Read more in the
                [Starlette docs for Application

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key