`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() ```
| 40 | |
| 41 | |
| 42 | class FastAPI(Starlette): |
| 43 | """ |
| 44 | `FastAPI` app class, the main entrypoint to use FastAPI. |
| 45 | |
| 46 | Read more in the |
| 47 | [FastAPI docs for First Steps](https://fastapi.tiangolo.com/tutorial/first-steps/). |
| 48 | |
| 49 | ## Example |
| 50 | |
| 51 | ```python |
| 52 | from fastapi import FastAPI |
| 53 | |
| 54 | app = FastAPI() |
| 55 | ``` |
| 56 | """ |
| 57 | |
| 58 | def __init__( |
| 59 | self: AppType, |
| 60 | *, |
| 61 | debug: Annotated[ |
| 62 | bool, |
| 63 | Doc( |
| 64 | """ |
| 65 | Boolean indicating if debug tracebacks should be returned on server |
| 66 | errors. |
| 67 | |
| 68 | Read more in the |
| 69 | [Starlette docs for Applications](https://www.starlette.dev/applications/#instantiating-the-application). |
| 70 | """ |
| 71 | ), |
| 72 | ] = False, |
| 73 | routes: Annotated[ |
| 74 | list[BaseRoute] | None, |
| 75 | Doc( |
| 76 | """ |
| 77 | **Note**: you probably shouldn't use this parameter, it is inherited |
| 78 | from Starlette and supported for compatibility. |
| 79 | |
| 80 | --- |
| 81 | |
| 82 | A list of routes to serve incoming HTTP and WebSocket requests. |
| 83 | """ |
| 84 | ), |
| 85 | deprecated( |
| 86 | """ |
| 87 | You normally wouldn't use this parameter with FastAPI, it is inherited |
| 88 | from Starlette and supported for compatibility. |
| 89 | |
| 90 | In FastAPI, you normally would use the *path operation methods*, |
| 91 | like `app.get()`, `app.post()`, etc. |
| 92 | """ |
| 93 | ), |
| 94 | ] = None, |
| 95 | title: Annotated[ |
| 96 | str, |
| 97 | Doc( |
| 98 | """ |
| 99 | The title of the API. |
no outgoing calls
searching dependent graphs…