Coverage for fastapi / applications.py: 100%
171 statements
« prev ^ index » next coverage.py v7.13.3, created at 2026-02-12 18:15 +0000
« prev ^ index » next coverage.py v7.13.3, created at 2026-02-12 18:15 +0000
1from collections.abc import Awaitable, Callable, Coroutine, Sequence 1abdc
2from enum import Enum 1abdc
3from typing import ( 1abdc
4 Annotated,
5 Any,
6 TypeVar,
7)
9from annotated_doc import Doc 1abdc
10from fastapi import routing 1abdc
11from fastapi.datastructures import Default, DefaultPlaceholder 1abdc
12from fastapi.exception_handlers import ( 1abdc
13 http_exception_handler,
14 request_validation_exception_handler,
15 websocket_request_validation_exception_handler,
16)
17from fastapi.exceptions import RequestValidationError, WebSocketRequestValidationError 1abdc
18from fastapi.logger import logger 1abdc
19from fastapi.middleware.asyncexitstack import AsyncExitStackMiddleware 1abdc
20from fastapi.openapi.docs import ( 1abdc
21 get_redoc_html,
22 get_swagger_ui_html,
23 get_swagger_ui_oauth2_redirect_html,
24)
25from fastapi.openapi.utils import get_openapi 1abdc
26from fastapi.params import Depends 1abdc
27from fastapi.types import DecoratedCallable, IncEx 1abdc
28from fastapi.utils import generate_unique_id 1abdc
29from starlette.applications import Starlette 1abdc
30from starlette.datastructures import State 1abdc
31from starlette.exceptions import HTTPException 1abdc
32from starlette.middleware import Middleware 1abdc
33from starlette.middleware.base import BaseHTTPMiddleware 1abdc
34from starlette.middleware.errors import ServerErrorMiddleware 1abdc
35from starlette.middleware.exceptions import ExceptionMiddleware 1abdc
36from starlette.requests import Request 1abdc
37from starlette.responses import HTMLResponse, JSONResponse, Response 1abdc
38from starlette.routing import BaseRoute 1abdc
39from starlette.types import ASGIApp, ExceptionHandler, Lifespan, Receive, Scope, Send 1abdc
40from typing_extensions import deprecated 1abdc
42AppType = TypeVar("AppType", bound="FastAPI") 1abdc
45class FastAPI(Starlette): 1abdc
46 """
47 `FastAPI` app class, the main entrypoint to use FastAPI.
49 Read more in the
50 [FastAPI docs for First Steps](https://fastapi.tiangolo.com/tutorial/first-steps/).
52 ## Example
54 ```python
55 from fastapi import FastAPI
57 app = FastAPI()
58 ```
59 """
61 def __init__( 1abdc
62 self: AppType,
63 *,
64 debug: Annotated[
65 bool,
66 Doc(
67 """
68 Boolean indicating if debug tracebacks should be returned on server
69 errors.
71 Read more in the
72 [Starlette docs for Applications](https://www.starlette.dev/applications/#instantiating-the-application).
73 """
74 ),
75 ] = False,
76 routes: Annotated[
77 list[BaseRoute] | None,
78 Doc(
79 """
80 **Note**: you probably shouldn't use this parameter, it is inherited
81 from Starlette and supported for compatibility.
83 ---
85 A list of routes to serve incoming HTTP and WebSocket requests.
86 """
87 ),
88 deprecated(
89 """
90 You normally wouldn't use this parameter with FastAPI, it is inherited
91 from Starlette and supported for compatibility.
93 In FastAPI, you normally would use the *path operation methods*,
94 like `app.get()`, `app.post()`, etc.
95 """
96 ),
97 ] = None,
98 title: Annotated[
99 str,
100 Doc(
101 """
102 The title of the API.
104 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
106 Read more in the
107 [FastAPI docs for Metadata and Docs URLs](https://fastapi.tiangolo.com/tutorial/metadata/#metadata-for-api).
109 **Example**
111 ```python
112 from fastapi import FastAPI
114 app = FastAPI(title="ChimichangApp")
115 ```
116 """
117 ),
118 ] = "FastAPI",
119 summary: Annotated[
120 str | None,
121 Doc(
122 """
123 A short summary of the API.
125 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
127 Read more in the
128 [FastAPI docs for Metadata and Docs URLs](https://fastapi.tiangolo.com/tutorial/metadata/#metadata-for-api).
130 **Example**
132 ```python
133 from fastapi import FastAPI
135 app = FastAPI(summary="Deadpond's favorite app. Nuff said.")
136 ```
137 """
138 ),
139 ] = None,
140 description: Annotated[
141 str,
142 Doc(
143 '''
144 A description of the API. Supports Markdown (using
145 [CommonMark syntax](https://commonmark.org/)).
147 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
149 Read more in the
150 [FastAPI docs for Metadata and Docs URLs](https://fastapi.tiangolo.com/tutorial/metadata/#metadata-for-api).
152 **Example**
154 ```python
155 from fastapi import FastAPI
157 app = FastAPI(
158 description="""
159 ChimichangApp API helps you do awesome stuff. 🚀
161 ## Items
163 You can **read items**.
165 ## Users
167 You will be able to:
169 * **Create users** (_not implemented_).
170 * **Read users** (_not implemented_).
172 """
173 )
174 ```
175 '''
176 ),
177 ] = "",
178 version: Annotated[
179 str,
180 Doc(
181 """
182 The version of the API.
184 **Note** This is the version of your application, not the version of
185 the OpenAPI specification nor the version of FastAPI being used.
187 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
189 Read more in the
190 [FastAPI docs for Metadata and Docs URLs](https://fastapi.tiangolo.com/tutorial/metadata/#metadata-for-api).
192 **Example**
194 ```python
195 from fastapi import FastAPI
197 app = FastAPI(version="0.0.1")
198 ```
199 """
200 ),
201 ] = "0.1.0",
202 openapi_url: Annotated[
203 str | None,
204 Doc(
205 """
206 The URL where the OpenAPI schema will be served from.
208 If you set it to `None`, no OpenAPI schema will be served publicly, and
209 the default automatic endpoints `/docs` and `/redoc` will also be
210 disabled.
212 Read more in the
213 [FastAPI docs for Metadata and Docs URLs](https://fastapi.tiangolo.com/tutorial/metadata/#openapi-url).
215 **Example**
217 ```python
218 from fastapi import FastAPI
220 app = FastAPI(openapi_url="/api/v1/openapi.json")
221 ```
222 """
223 ),
224 ] = "/openapi.json",
225 openapi_tags: Annotated[
226 list[dict[str, Any]] | None,
227 Doc(
228 """
229 A list of tags used by OpenAPI, these are the same `tags` you can set
230 in the *path operations*, like:
232 * `@app.get("/users/", tags=["users"])`
233 * `@app.get("/items/", tags=["items"])`
235 The order of the tags can be used to specify the order shown in
236 tools like Swagger UI, used in the automatic path `/docs`.
238 It's not required to specify all the tags used.
240 The tags that are not declared MAY be organized randomly or based
241 on the tools' logic. Each tag name in the list MUST be unique.
243 The value of each item is a `dict` containing:
245 * `name`: The name of the tag.
246 * `description`: A short description of the tag.
247 [CommonMark syntax](https://commonmark.org/) MAY be used for rich
248 text representation.
249 * `externalDocs`: Additional external documentation for this tag. If
250 provided, it would contain a `dict` with:
251 * `description`: A short description of the target documentation.
252 [CommonMark syntax](https://commonmark.org/) MAY be used for
253 rich text representation.
254 * `url`: The URL for the target documentation. Value MUST be in
255 the form of a URL.
257 Read more in the
258 [FastAPI docs for Metadata and Docs URLs](https://fastapi.tiangolo.com/tutorial/metadata/#metadata-for-tags).
260 **Example**
262 ```python
263 from fastapi import FastAPI
265 tags_metadata = [
266 {
267 "name": "users",
268 "description": "Operations with users. The **login** logic is also here.",
269 },
270 {
271 "name": "items",
272 "description": "Manage items. So _fancy_ they have their own docs.",
273 "externalDocs": {
274 "description": "Items external docs",
275 "url": "https://fastapi.tiangolo.com/",
276 },
277 },
278 ]
280 app = FastAPI(openapi_tags=tags_metadata)
281 ```
282 """
283 ),
284 ] = None,
285 servers: Annotated[
286 list[dict[str, str | Any]] | None,
287 Doc(
288 """
289 A `list` of `dict`s with connectivity information to a target server.
291 You would use it, for example, if your application is served from
292 different domains and you want to use the same Swagger UI in the
293 browser to interact with each of them (instead of having multiple
294 browser tabs open). Or if you want to leave fixed the possible URLs.
296 If the servers `list` is not provided, or is an empty `list`, the
297 `servers` property in the generated OpenAPI will be:
299 * a `dict` with a `url` value of the application's mounting point
300 (`root_path`) if it's different from `/`.
301 * otherwise, the `servers` property will be omitted from the OpenAPI
302 schema.
304 Each item in the `list` is a `dict` containing:
306 * `url`: A URL to the target host. This URL supports Server Variables
307 and MAY be relative, to indicate that the host location is relative
308 to the location where the OpenAPI document is being served. Variable
309 substitutions will be made when a variable is named in `{`brackets`}`.
310 * `description`: An optional string describing the host designated by
311 the URL. [CommonMark syntax](https://commonmark.org/) MAY be used for
312 rich text representation.
313 * `variables`: A `dict` between a variable name and its value. The value
314 is used for substitution in the server's URL template.
316 Read more in the
317 [FastAPI docs for Behind a Proxy](https://fastapi.tiangolo.com/advanced/behind-a-proxy/#additional-servers).
319 **Example**
321 ```python
322 from fastapi import FastAPI
324 app = FastAPI(
325 servers=[
326 {"url": "https://stag.example.com", "description": "Staging environment"},
327 {"url": "https://prod.example.com", "description": "Production environment"},
328 ]
329 )
330 ```
331 """
332 ),
333 ] = None,
334 dependencies: Annotated[
335 Sequence[Depends] | None,
336 Doc(
337 """
338 A list of global dependencies, they will be applied to each
339 *path operation*, including in sub-routers.
341 Read more about it in the
342 [FastAPI docs for Global Dependencies](https://fastapi.tiangolo.com/tutorial/dependencies/global-dependencies/).
344 **Example**
346 ```python
347 from fastapi import Depends, FastAPI
349 from .dependencies import func_dep_1, func_dep_2
351 app = FastAPI(dependencies=[Depends(func_dep_1), Depends(func_dep_2)])
352 ```
353 """
354 ),
355 ] = None,
356 default_response_class: Annotated[
357 type[Response],
358 Doc(
359 """
360 The default response class to be used.
362 Read more in the
363 [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/#default-response-class).
365 **Example**
367 ```python
368 from fastapi import FastAPI
369 from fastapi.responses import ORJSONResponse
371 app = FastAPI(default_response_class=ORJSONResponse)
372 ```
373 """
374 ),
375 ] = Default(JSONResponse),
376 redirect_slashes: Annotated[
377 bool,
378 Doc(
379 """
380 Whether to detect and redirect slashes in URLs when the client doesn't
381 use the same format.
383 **Example**
385 ```python
386 from fastapi import FastAPI
388 app = FastAPI(redirect_slashes=True) # the default
390 @app.get("/items/")
391 async def read_items():
392 return [{"item_id": "Foo"}]
393 ```
395 With this app, if a client goes to `/items` (without a trailing slash),
396 they will be automatically redirected with an HTTP status code of 307
397 to `/items/`.
398 """
399 ),
400 ] = True,
401 docs_url: Annotated[
402 str | None,
403 Doc(
404 """
405 The path to the automatic interactive API documentation.
406 It is handled in the browser by Swagger UI.
408 The default URL is `/docs`. You can disable it by setting it to `None`.
410 If `openapi_url` is set to `None`, this will be automatically disabled.
412 Read more in the
413 [FastAPI docs for Metadata and Docs URLs](https://fastapi.tiangolo.com/tutorial/metadata/#docs-urls).
415 **Example**
417 ```python
418 from fastapi import FastAPI
420 app = FastAPI(docs_url="/documentation", redoc_url=None)
421 ```
422 """
423 ),
424 ] = "/docs",
425 redoc_url: Annotated[
426 str | None,
427 Doc(
428 """
429 The path to the alternative automatic interactive API documentation
430 provided by ReDoc.
432 The default URL is `/redoc`. You can disable it by setting it to `None`.
434 If `openapi_url` is set to `None`, this will be automatically disabled.
436 Read more in the
437 [FastAPI docs for Metadata and Docs URLs](https://fastapi.tiangolo.com/tutorial/metadata/#docs-urls).
439 **Example**
441 ```python
442 from fastapi import FastAPI
444 app = FastAPI(docs_url="/documentation", redoc_url="redocumentation")
445 ```
446 """
447 ),
448 ] = "/redoc",
449 swagger_ui_oauth2_redirect_url: Annotated[
450 str | None,
451 Doc(
452 """
453 The OAuth2 redirect endpoint for the Swagger UI.
455 By default it is `/docs/oauth2-redirect`.
457 This is only used if you use OAuth2 (with the "Authorize" button)
458 with Swagger UI.
459 """
460 ),
461 ] = "/docs/oauth2-redirect",
462 swagger_ui_init_oauth: Annotated[
463 dict[str, Any] | None,
464 Doc(
465 """
466 OAuth2 configuration for the Swagger UI, by default shown at `/docs`.
468 Read more about the available configuration options in the
469 [Swagger UI docs](https://swagger.io/docs/open-source-tools/swagger-ui/usage/oauth2/).
470 """
471 ),
472 ] = None,
473 middleware: Annotated[
474 Sequence[Middleware] | None,
475 Doc(
476 """
477 List of middleware to be added when creating the application.
479 In FastAPI you would normally do this with `app.add_middleware()`
480 instead.
482 Read more in the
483 [FastAPI docs for Middleware](https://fastapi.tiangolo.com/tutorial/middleware/).
484 """
485 ),
486 ] = None,
487 exception_handlers: Annotated[
488 dict[
489 int | type[Exception],
490 Callable[[Request, Any], Coroutine[Any, Any, Response]],
491 ]
492 | None,
493 Doc(
494 """
495 A dictionary with handlers for exceptions.
497 In FastAPI, you would normally use the decorator
498 `@app.exception_handler()`.
500 Read more in the
501 [FastAPI docs for Handling Errors](https://fastapi.tiangolo.com/tutorial/handling-errors/).
502 """
503 ),
504 ] = None,
505 on_startup: Annotated[
506 Sequence[Callable[[], Any]] | None,
507 Doc(
508 """
509 A list of startup event handler functions.
511 You should instead use the `lifespan` handlers.
513 Read more in the [FastAPI docs for `lifespan`](https://fastapi.tiangolo.com/advanced/events/).
514 """
515 ),
516 ] = None,
517 on_shutdown: Annotated[
518 Sequence[Callable[[], Any]] | None,
519 Doc(
520 """
521 A list of shutdown event handler functions.
523 You should instead use the `lifespan` handlers.
525 Read more in the
526 [FastAPI docs for `lifespan`](https://fastapi.tiangolo.com/advanced/events/).
527 """
528 ),
529 ] = None,
530 lifespan: Annotated[
531 Lifespan[AppType] | None,
532 Doc(
533 """
534 A `Lifespan` context manager handler. This replaces `startup` and
535 `shutdown` functions with a single context manager.
537 Read more in the
538 [FastAPI docs for `lifespan`](https://fastapi.tiangolo.com/advanced/events/).
539 """
540 ),
541 ] = None,
542 terms_of_service: Annotated[
543 str | None,
544 Doc(
545 """
546 A URL to the Terms of Service for your API.
548 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
550 Read more at the
551 [FastAPI docs for Metadata and Docs URLs](https://fastapi.tiangolo.com/tutorial/metadata/#metadata-for-api).
553 **Example**
555 ```python
556 app = FastAPI(terms_of_service="http://example.com/terms/")
557 ```
558 """
559 ),
560 ] = None,
561 contact: Annotated[
562 dict[str, str | Any] | None,
563 Doc(
564 """
565 A dictionary with the contact information for the exposed API.
567 It can contain several fields.
569 * `name`: (`str`) The name of the contact person/organization.
570 * `url`: (`str`) A URL pointing to the contact information. MUST be in
571 the format of a URL.
572 * `email`: (`str`) The email address of the contact person/organization.
573 MUST be in the format of an email address.
575 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
577 Read more at the
578 [FastAPI docs for Metadata and Docs URLs](https://fastapi.tiangolo.com/tutorial/metadata/#metadata-for-api).
580 **Example**
582 ```python
583 app = FastAPI(
584 contact={
585 "name": "Deadpoolio the Amazing",
586 "url": "http://x-force.example.com/contact/",
587 "email": "dp@x-force.example.com",
588 }
589 )
590 ```
591 """
592 ),
593 ] = None,
594 license_info: Annotated[
595 dict[str, str | Any] | None,
596 Doc(
597 """
598 A dictionary with the license information for the exposed API.
600 It can contain several fields.
602 * `name`: (`str`) **REQUIRED** (if a `license_info` is set). The
603 license name used for the API.
604 * `identifier`: (`str`) An [SPDX](https://spdx.dev/) license expression
605 for the API. The `identifier` field is mutually exclusive of the `url`
606 field. Available since OpenAPI 3.1.0, FastAPI 0.99.0.
607 * `url`: (`str`) A URL to the license used for the API. This MUST be
608 the format of a URL.
610 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
612 Read more at the
613 [FastAPI docs for Metadata and Docs URLs](https://fastapi.tiangolo.com/tutorial/metadata/#metadata-for-api).
615 **Example**
617 ```python
618 app = FastAPI(
619 license_info={
620 "name": "Apache 2.0",
621 "url": "https://www.apache.org/licenses/LICENSE-2.0.html",
622 }
623 )
624 ```
625 """
626 ),
627 ] = None,
628 openapi_prefix: Annotated[
629 str,
630 Doc(
631 """
632 A URL prefix for the OpenAPI URL.
633 """
634 ),
635 deprecated(
636 """
637 "openapi_prefix" has been deprecated in favor of "root_path", which
638 follows more closely the ASGI standard, is simpler, and more
639 automatic.
640 """
641 ),
642 ] = "",
643 root_path: Annotated[
644 str,
645 Doc(
646 """
647 A path prefix handled by a proxy that is not seen by the application
648 but is seen by external clients, which affects things like Swagger UI.
650 Read more about it at the
651 [FastAPI docs for Behind a Proxy](https://fastapi.tiangolo.com/advanced/behind-a-proxy/).
653 **Example**
655 ```python
656 from fastapi import FastAPI
658 app = FastAPI(root_path="/api/v1")
659 ```
660 """
661 ),
662 ] = "",
663 root_path_in_servers: Annotated[
664 bool,
665 Doc(
666 """
667 To disable automatically generating the URLs in the `servers` field
668 in the autogenerated OpenAPI using the `root_path`.
670 Read more about it in the
671 [FastAPI docs for Behind a Proxy](https://fastapi.tiangolo.com/advanced/behind-a-proxy/#disable-automatic-server-from-root-path).
673 **Example**
675 ```python
676 from fastapi import FastAPI
678 app = FastAPI(root_path_in_servers=False)
679 ```
680 """
681 ),
682 ] = True,
683 responses: Annotated[
684 dict[int | str, dict[str, Any]] | None,
685 Doc(
686 """
687 Additional responses to be shown in OpenAPI.
689 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
691 Read more about it in the
692 [FastAPI docs for Additional Responses in OpenAPI](https://fastapi.tiangolo.com/advanced/additional-responses/).
694 And in the
695 [FastAPI docs for Bigger Applications](https://fastapi.tiangolo.com/tutorial/bigger-applications/#include-an-apirouter-with-a-custom-prefix-tags-responses-and-dependencies).
696 """
697 ),
698 ] = None,
699 callbacks: Annotated[
700 list[BaseRoute] | None,
701 Doc(
702 """
703 OpenAPI callbacks that should apply to all *path operations*.
705 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
707 Read more about it in the
708 [FastAPI docs for OpenAPI Callbacks](https://fastapi.tiangolo.com/advanced/openapi-callbacks/).
709 """
710 ),
711 ] = None,
712 webhooks: Annotated[
713 routing.APIRouter | None,
714 Doc(
715 """
716 Add OpenAPI webhooks. This is similar to `callbacks` but it doesn't
717 depend on specific *path operations*.
719 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
721 **Note**: This is available since OpenAPI 3.1.0, FastAPI 0.99.0.
723 Read more about it in the
724 [FastAPI docs for OpenAPI Webhooks](https://fastapi.tiangolo.com/advanced/openapi-webhooks/).
725 """
726 ),
727 ] = None,
728 deprecated: Annotated[
729 bool | None,
730 Doc(
731 """
732 Mark all *path operations* as deprecated. You probably don't need it,
733 but it's available.
735 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
737 Read more about it in the
738 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/#deprecate-a-path-operation).
739 """
740 ),
741 ] = None,
742 include_in_schema: Annotated[
743 bool,
744 Doc(
745 """
746 To include (or not) all the *path operations* in the generated OpenAPI.
747 You probably don't need it, but it's available.
749 This affects the generated OpenAPI (e.g. visible at `/docs`).
751 Read more about it in the
752 [FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
753 """
754 ),
755 ] = True,
756 swagger_ui_parameters: Annotated[
757 dict[str, Any] | None,
758 Doc(
759 """
760 Parameters to configure Swagger UI, the autogenerated interactive API
761 documentation (by default at `/docs`).
763 Read more about it in the
764 [FastAPI docs about how to Configure Swagger UI](https://fastapi.tiangolo.com/how-to/configure-swagger-ui/).
765 """
766 ),
767 ] = None,
768 generate_unique_id_function: Annotated[
769 Callable[[routing.APIRoute], str],
770 Doc(
771 """
772 Customize the function used to generate unique IDs for the *path
773 operations* shown in the generated OpenAPI.
775 This is particularly useful when automatically generating clients or
776 SDKs for your API.
778 Read more about it in the
779 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
780 """
781 ),
782 ] = Default(generate_unique_id),
783 separate_input_output_schemas: Annotated[
784 bool,
785 Doc(
786 """
787 Whether to generate separate OpenAPI schemas for request body and
788 response body when the results would be more precise.
790 This is particularly useful when automatically generating clients.
792 For example, if you have a model like:
794 ```python
795 from pydantic import BaseModel
797 class Item(BaseModel):
798 name: str
799 tags: list[str] = []
800 ```
802 When `Item` is used for input, a request body, `tags` is not required,
803 the client doesn't have to provide it.
805 But when using `Item` for output, for a response body, `tags` is always
806 available because it has a default value, even if it's just an empty
807 list. So, the client should be able to always expect it.
809 In this case, there would be two different schemas, one for input and
810 another one for output.
812 Read more about it in the
813 [FastAPI docs about how to separate schemas for input and output](https://fastapi.tiangolo.com/how-to/separate-openapi-schemas)
814 """
815 ),
816 ] = True,
817 openapi_external_docs: Annotated[
818 dict[str, Any] | None,
819 Doc(
820 """
821 This field allows you to provide additional external documentation links.
822 If provided, it must be a dictionary containing:
824 * `description`: A brief description of the external documentation.
825 * `url`: The URL pointing to the external documentation. The value **MUST**
826 be a valid URL format.
828 **Example**:
830 ```python
831 from fastapi import FastAPI
833 external_docs = {
834 "description": "Detailed API Reference",
835 "url": "https://example.com/api-docs",
836 }
838 app = FastAPI(openapi_external_docs=external_docs)
839 ```
840 """
841 ),
842 ] = None,
843 **extra: Annotated[
844 Any,
845 Doc(
846 """
847 Extra keyword arguments to be stored in the app, not used by FastAPI
848 anywhere.
849 """
850 ),
851 ],
852 ) -> None:
853 self.debug = debug 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
854 self.title = title 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
855 self.summary = summary 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
856 self.description = description 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
857 self.version = version 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
858 self.terms_of_service = terms_of_service 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
859 self.contact = contact 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
860 self.license_info = license_info 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
861 self.openapi_url = openapi_url 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
862 self.openapi_tags = openapi_tags 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
863 self.root_path_in_servers = root_path_in_servers 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
864 self.docs_url = docs_url 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
865 self.redoc_url = redoc_url 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
866 self.swagger_ui_oauth2_redirect_url = swagger_ui_oauth2_redirect_url 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
867 self.swagger_ui_init_oauth = swagger_ui_init_oauth 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
868 self.swagger_ui_parameters = swagger_ui_parameters 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
869 self.servers = servers or [] 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
870 self.separate_input_output_schemas = separate_input_output_schemas 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
871 self.openapi_external_docs = openapi_external_docs 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
872 self.extra = extra 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
873 self.openapi_version: Annotated[ 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
874 str,
875 Doc(
876 """
877 The version string of OpenAPI.
879 FastAPI will generate OpenAPI version 3.1.0, and will output that as
880 the OpenAPI version. But some tools, even though they might be
881 compatible with OpenAPI 3.1.0, might not recognize it as a valid.
883 So you could override this value to trick those tools into using
884 the generated OpenAPI. Have in mind that this is a hack. But if you
885 avoid using features added in OpenAPI 3.1.0, it might work for your
886 use case.
888 This is not passed as a parameter to the `FastAPI` class to avoid
889 giving the false idea that FastAPI would generate a different OpenAPI
890 schema. It is only available as an attribute.
892 **Example**
894 ```python
895 from fastapi import FastAPI
897 app = FastAPI()
899 app.openapi_version = "3.0.2"
900 ```
901 """
902 ),
903 ] = "3.1.0"
904 self.openapi_schema: dict[str, Any] | None = None 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
905 if self.openapi_url: 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
906 assert self.title, "A title must be provided for OpenAPI, e.g.: 'My API'" 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe Cb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf .bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg CcYdZdDcEc0dFc] GcW HcIcJcKc
907 assert self.version, "A version must be provided for OpenAPI, e.g.: '2.1.0'" 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe Cb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf .bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg CcYdZdDcEc0dFc] GcW HcIcJcKc
908 # TODO: remove when discarding the openapi_prefix parameter
909 if openapi_prefix: 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
910 logger.warning( 1abdc
911 '"openapi_prefix" has been deprecated in favor of "root_path", which '
912 "follows more closely the ASGI standard, is simpler, and more "
913 "automatic. Check the docs at "
914 "https://fastapi.tiangolo.com/advanced/sub-applications/"
915 )
916 self.webhooks: Annotated[ 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
917 routing.APIRouter,
918 Doc(
919 """
920 The `app.webhooks` attribute is an `APIRouter` with the *path
921 operations* that will be used just for documentation of webhooks.
923 Read more about it in the
924 [FastAPI docs for OpenAPI Webhooks](https://fastapi.tiangolo.com/advanced/openapi-webhooks/).
925 """
926 ),
927 ] = webhooks or routing.APIRouter()
928 self.root_path = root_path or openapi_prefix 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
929 self.state: Annotated[ 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
930 State,
931 Doc(
932 """
933 A state object for the application. This is the same object for the
934 entire application, it doesn't change from request to request.
936 You normally wouldn't use this in FastAPI, for most of the cases you
937 would instead use FastAPI dependencies.
939 This is simply inherited from Starlette.
941 Read more about it in the
942 [Starlette docs for Applications](https://www.starlette.dev/applications/#storing-state-on-the-app-instance).
943 """
944 ),
945 ] = State()
946 self.dependency_overrides: Annotated[ 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
947 dict[Callable[..., Any], Callable[..., Any]],
948 Doc(
949 """
950 A dictionary with overrides for the dependencies.
952 Each key is the original dependency callable, and the value is the
953 actual dependency that should be called.
955 This is for testing, to replace expensive dependencies with testing
956 versions.
958 Read more about it in the
959 [FastAPI docs for Testing Dependencies with Overrides](https://fastapi.tiangolo.com/advanced/testing-dependencies/).
960 """
961 ),
962 ] = {}
963 self.router: routing.APIRouter = routing.APIRouter( 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
964 routes=routes,
965 redirect_slashes=redirect_slashes,
966 dependency_overrides_provider=self,
967 on_startup=on_startup,
968 on_shutdown=on_shutdown,
969 lifespan=lifespan,
970 default_response_class=default_response_class,
971 dependencies=dependencies,
972 callbacks=callbacks,
973 deprecated=deprecated,
974 include_in_schema=include_in_schema,
975 responses=responses,
976 generate_unique_id_function=generate_unique_id_function,
977 )
978 self.exception_handlers: dict[ 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
979 Any, Callable[[Request, Any], Response | Awaitable[Response]]
980 ] = {} if exception_handlers is None else dict(exception_handlers)
981 self.exception_handlers.setdefault(HTTPException, http_exception_handler) 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
982 self.exception_handlers.setdefault( 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
983 RequestValidationError, request_validation_exception_handler
984 )
985 self.exception_handlers.setdefault( 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
986 WebSocketRequestValidationError,
987 # Starlette still has incorrect type specification for the handlers
988 websocket_request_validation_exception_handler, # type: ignore
989 )
991 self.user_middleware: list[Middleware] = ( 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
992 [] if middleware is None else list(middleware)
993 )
994 self.middleware_stack: ASGIApp | None = None 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
995 self.setup() 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
997 def build_middleware_stack(self) -> ASGIApp: 1abdc
998 # Duplicate/override from Starlette to add AsyncExitStackMiddleware
999 # inside of ExceptionMiddleware, inside of custom user middlewares
1000 debug = self.debug 2a 'e(e)e*e+e,e-e.e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jWjXjYjUeZj`d0j1j! # $ w x % ' 2j3j4j5j6j7j8j9j!jWbXbP YbZbQ 0b1b2b#j$j%j'j{d(j)j*j+j,j-j.j/j:j;j=j?j@j[j]j^j_j`j{j|j}j~jakbkckdkek|dfk3b4b5b6b7b8b9bgkhkikjkkklk!bmk#b$b%b'b( Y ) (b)b* nk*b+bok}d+ y pk~dqkrksktkukvkwkxkykzkAkBkCkDkEkFkGkHkIkJkKkLkMkNkOkPkQkRkSkTkUkVkWkXkYkZk0k1k2k3k4k5k6kae,b-b7kJe8k9k!k#k$k%k'k(k)k*k+k,k-k.k/k5e6e7e:k;k=k?k@k[k]k^k_k`k{k|k}k~kalblcldlelflf md.bKeLeMeglhliljlklllmlnlolplqlrlsltlulvlwlxlylzlAlBlClbeDlElFlGl/bHlIlJlKl:bLlMlNlOlPlQlRlSlTlUlVlWlXlYlZl0l1l2l3l4l5l6l7l8l9l!l#l$l%l'l(l)l*l+lce,l-l.l/l:l;l=l?l@l[l]l^l_l`l{l|l}l~lambmcmdmemfmgmhmimjmkmlmmmnmompmqmrmsmtmumvmwmxmymzmAmBmCmDmEmFmGmHmImJmKmLmMmNmOmPmQmRmSmTmUmVmWmXmYmZm0m1m2m3m4m5m6m7m8m9m!m#m$m%m'm(m)m*m+m,m-m.mde/m:m;m=m?m;b@m, [m]m^m_m`m{m=b|mR ee}m~manbncndnenfngnfe?bhnin@b[b]bc jnknlnmnnnonpnqnNegeheiejernkesn8etn^b_bunvnlewn`b{bxnmeynznneOe|b}bAnBnCnDnEnFnGnHnInJnKnLnMn~bNnOnPnacbcQnRn9eSnTnUn!eVnWnXnoeYnZn0n1n2nz S A B C D E T 3n4npe5n6n7n8n9ncc!ndc#n$n%n'nVe(nqe)n*n- . / F G : ; +n,n-n.n/n:n;n=n?necfcU gchcV icjckc@n[n]n^nre_n`n{n|n}n~naobocodoeofogohoiojokolomonooopoqorosotouosevolcmcncocpcqcrcwoxoyozoAoBoscCotcucvcwc= Z ? xcyc@ DozcAc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XlYlZl0l1l2l3l4l5l6l7l8l9l!l#l$l%l'l(l)l*l+lce,l-l.l/l:l;l=l?l@l[l]l^l_l`l{l|l}l~lambmcmdmemfmgmhmimjmkmlmmmnmompmqmrmsmtmumvmwmxmymzmAmBmCmDmEmFmGmHmImJmKmLmMmNmOmPmQmRmSmTmUmVmWmXmYmZm0m1m2m3m4m5m6m7m8m9m!m#m$m%m'm(m)m*m+m,m-m.mde/m:m;m=m?m;b@m, [m]m^m_m`m{m=b|mR ee}m~manbncndnenfngnfe?bhnin@b[b]bc jnknlnmnnnonpnqnNegeheiejernkesn8etn^b_bunvnlewn`b{bxnmeynznneOe|b}bAnBnCnDnEnFnGnHnInJnKnLnMn~bNnOnPnacbcQnRn9eSnTnUn!eVnWnXnoeYnZn0n1n2nz S A B C D E T 3n4npe5n6n7n8n9ncc!ndc#n$n%n'nVe(nqe)n*n- . / F G : ; +n,n-n.n/n:n;n=n?necfcU gchcV icjckc@n[n]n^nre_n`n{n|n}n~naobocodoeofogohoiojokolomonooopoqorosotouosevolcmcncocpcqcrcwoxoyozoAoBoscCotcucvcwc= Z ? xcyc@ DozcAcEote[ H FoueGoHoIoJoKoLoMoNoOoPoQoRoSoToUoVoWoXoYoZo0o1o2o3o4o5o6o7o8o9o!o#o$o%o'o(o)o*o+o,o-o.o/oveBc:oPe;o=o?o@o[o]o^o_o`o{o|o}o~oapbp#e$e%ecpdpepfpgphpipjpkplpmpnpopppqprpsptpupvpg XdCcQeReSewpxpypzpApBpCpDpEpFpGpHpIpJpKpLpMpNpOpPpQpRpSpweTpUpVpWpDcXpYpZp0pEc1p2p3p4p5p6p7p8p9p!p#p$p%p'p(p)p*p+p,p-p.p/p:p;p=p?p@p[p]p^p_p`p{p|pxe}p~paqbqcqdqeqfqgqhqiqjqkqlqmqnqoqpqqqrqsqtquqvqwqxqyqzqAqBqCqDqEqFqGqHqIqJqKqLqMqNqOqPqQqRqSqTqUqVqWqXqYqZq0q1q2q3q4q5q6q7q8q9q!q#q$q%q'q(q)q*q+q,q-q.q/q:q;q=q?q@q[q]q^q_q`q{q|q}q~qaryebrcrdrerfrFcgr] hrirjrkrlrmrGcnrW zeorprqrrrsrtrurvrwrAeHcxryrIcJcKc
1002 exception_handlers: dict[Any, ExceptionHandler] = {} 2a 'e(e)e*e+e,e-e.eBe1d2d3d4d/e5d:eWe;e^ _ =e?e6d@e` { [e7d]e^e8dCe| } _e`e{e|e}e~eafbfcfdfefffgf~ hfifjfabbbkflfXemfnfofYepfqfrf9dsftfufvfwfh I i j k l m J xfyf!dzfAfBfCfDfcbEfdbFfGfHfIfTeJf#dKfLf0 1 2 n o 3 4 MfNfOfPfQfRfSfTfUfebfbK gbhbL ibjbkbVfWfXfYf$dZf0f1f2f3f4f5f6f7f8f9f!f#f$f%f'f(f)f*f+f,f-f.f/f:f;f=f%d?flbmbnbobpbqbrb@f[f]f^f_f`fsb{ftbubvbwb5 X 6 xbyb7 |fzbAb}f'd8 p ~f(dagbgcgdgegfggghgigjgkglgmgngogpgqgrgsgtgugvgwgxgygzgAgBgCgDgEgFgGgHgIgJgKgLgMgNgOgPgQg)dBbRgDeSgTgUgVgWgXgYgZg0g1g2g3g4g5g6gZe0e1e7g8g9g!g#g$g%g'g(g)g*g+g,g-g.g/g:g;g=g?ge +cCbEeFeGe@g[g]g^g_g`g{g|g}g~gahbhchdhehfhghhhihjhkhlhmh*dnhohphqhDbrhshthuhEbvhwhxhyhzhAhBhChDhEhFhGhHhIhJhKhLhMhNhOhPhQhRhShThUhVhWhXhYhZh0h1h2h+d3h4h5h6h7h8h9h!h#h$h%h'h(h)h*h+h,h-h.h/h:h;h=h?h@h[h]h^h_h`h{h|h}h~haibicidieifigihiiijikiliminioipiqirisitiuiviwixiyiziAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi0i1i2i3i4i5i,d6i7i8i9i!iFb#i9 $i%i'i(i)i*iGb+iM -d,i-i.i/i:i;i=i?i@i.dHb[i]iIbJbKbb ^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8n9ncc!ndc#n$n%n'nVe(nqe)n*n- . / F G : ; +n,n-n.n/n:n;n=n?necfcU gchcV icjckc@n[n]n^nre_n`n{n|n}n~naobocodoeofogohoiojokolomonooopoqorosotouosevolcmcncocpcqcrcwoxoyozoAoBoscCotcucvcwc= Z ? xcyc@ DozcAcEote[ H FoueGoHoIoJoKoLoMoNoOoPoQoRoSoToUoVoWoXoYoZo0o1o2o3o4o5o6o7o8o9o!o#o$o%o'o(o)o*o+o,o-o.o/oveBc:oPe;o=o?o@o[o]o^o_o`o{o|o}o~oapbp#e$e%ecpdpepfpgphpipjpkplpmpnpopppqprpsptpupvpg XdCcQeReSewpxpypzpApBpCpDpEpFpGpHpIpJpKpLpMpNpOpPpQpRpSpweTpUpVpWpDcXpYpZp0pEc1p2p3p4p5p6p7p8p9p!p#p$p%p'p(p)p*p+p,p-p.p/p:p;p=p?p@p[p]p^p_p`p{p|pxe}p~paqbqcqdqeqfqgqhqiqjqkqlqmqnqoqpqqqrqsqtquqvqwqxqyqzqAqBqCqDqEqFqGqHqIqJqKqLqMqNqOqPqQqRqSqTqUqVqWqXqYqZq0q1q2q3q4q5q6q7q8q9q!q#q$q%q'q(q)q*q+q,q-q.q/q:q;q=q?q@q[q]q^q_q`q{q|q}q~qaryebrcrdrerfrFcgr] hrirjrkrlrmrGcnrW zeorprqrrrsrtrurvrwrAeHcxryrIcJcKc
1004 for key, value in self.exception_handlers.items(): 2a 'e(e)e*e+e,e-e.eBe1d2d3d4d/e5d:eWe;e^ _ =e?e6d@e` { [e7d]e^e8dCe| } _e`e{e|e}e~eafbfcfdfefffgf~ hfifjfabbbkflfXemfnfofYepfqfrf9dsftfufvfwfh I i j k l m J xfyf!dzfAfBfCfDfcbEfdbFfGfHfIfTeJf#dKfLf0 1 2 n o 3 4 MfNfOfPfQfRfSfTfUfebfbK gbhbL ibjbkbVfWfXfYf$dZf0f1f2f3f4f5f6f7f8f9f!f#f$f%f'f(f)f*f+f,f-f.f/f:f;f=f%d?flbmb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ae,b-b7kJe8k9k!k#k$k%k'k(k)k*k+k,k-k.k/k5e6e7e:k;k=k?k@k[k]k^k_k`k{k|k}k~kalblcldlelflf md.bKeLeMeglhliljlklllmlnlolplqlrlsltlulvlwlxlylzlAlBlClbeDlElFlGl/bHlIlJlKl:bLlMlNlOlPlQlRlSlTlUlVlWlXlYlZl0l1l2l3l4l5l6l7l8l9l!l#l$l%l'l(l)l*l+lce,l-l.l/l:l;l=l?l@l[l]l^l_l`l{l|l}l~lambmcmdmemfmgmhmimjmkmlmmmnmompmqmrmsmtmumvmwmxmymzmAmBmCmDmEmFmGmHmImJmKmLmMmNmOmPmQmRmSmTmUmVmWmXmYmZm0m1m2m3m4m5m6m7m8m9m!m#m$m%m'm(m)m*m+m,m-m.mde/m:m;m=m?m;b@m, [m]m^m_m`m{m=b|mR ee}m~manbncndnenfngnfe?bhnin@b[b]bc jnknlnmnnnonpnqnNegeheiejernkesn8etn^b_bunvnlewn`b{bxnmeynznneOe|b}bAnBnCnDnEnFnGnHnInJnKnLnMn~bNnOnPnacbcQnRn9eSnTnUn!eVnWnXnoeYnZn0n1n2nz S A B C D E T 3n4npe5n6n7n8n9ncc!ndc#n$n%n'nVe(nqe)n*n- . / F G : ; +n,n-n.n/n:n;n=n?necfcU gchcV icjckc@n[n]n^nre_n`n{n|n}n~naobocodoeofogohoiojokolomonooopoqorosotouosevolcmcncocpcqcrcwoxoyozoAoBoscCotcucvcwc= Z ? xcyc@ DozcAcEote[ H FoueGoHoIoJoKoLoMoNoOoPoQoRoSoToUoVoWoXoYoZo0o1o2o3o4o5o6o7o8o9o!o#o$o%o'o(o)o*o+o,o-o.o/oveBc:oPe;o=o?o@o[o]o^o_o`o{o|o}o~oapbp#e$e%ecpdpepfpgphpipjpkplpmpnpopppqprpsptpupvpg XdCcQeReSewpxpypzpApBpCpDpEpFpGpHpIpJpKpLpMpNpOpPpQpRpSpweTpUpVpWpDcXpYpZp0pEc1p2p3p4p5p6p7p8p9p!p#p$p%p'p(p)p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e?bhnin@b[b]bc jnknlnmnnnonpnqnNegeheiejernkesn8etn^b_bunvnlewn`b{bxnmeynznneOe|b}bAnBnCnDnEnFnGnHnInJnKnLnMn~bNnOnPnacbcQnRn9eSnTnUn!eVnWnXnoeYnZn0n1n2nz S A B C D E T 3n4npe5n6n7n8n9ncc!ndc#n$n%n'nVe(nqe)n*n- . / F G : ; +n,n-n.n/n:n;n=n?necfcU gchcV icjckc@n[n]n^nre_n`n{n|n}n~naobocodoeofogohoiojokolomonooopoqorosotouosevolcmcncocpcqcrcwoxoyozoAoBoscCotcucvcwc= Z ? xcyc@ DozcAcEote[ H FoueGoHoIoJoKoLoMoNoOoPoQoRoSoToUoVoWoXoYoZo0o1o2o3o4o5o6o7o8o9o!o#o$o%o'o(o)o*o+o,o-o.o/oveBc:oPe;o=o?o@o[o]o^o_o`o{o|o}o~oapbp#e$e%ecpdpepfpgphpipjpkplpmpnpopppqprpsptpupvpg XdCcQeReSewpxpypzpApBpCpDpEpFpGpHpIpJpKpLpMpNpOpPpQpRpSpweTpUpVpWpDcXpYpZp0pEc1p2p3p4p5p6p7p8p9p!p#p$p%p'p(p)p*p+p,p-p.p/p:p;p=p?p@p[p]p^p_p`p{p|pxe}p~paqbqcqdqeqfqgqhqiqjqkqlqmqnqoqpqqqrqsqtquqvqwqxqyqzqAqBqCqDqEqFqGqHqIqJqKqLqMqNqOqPqQqRqSqTqUqVqWqXqYqZq0q1q2q3q4q5q6q7q8q9q!q#q$q%q'q(q)q*q+q,q-q.q/q:q;q=q?q@q[q]q^q_q`q{q|q}q~qaryebrcrdrerfrFcgr] hrirjrkrlrmrGcnrW zeorprqrrrsrtrurvrwrAeHcxryrIcJcKc
1006 error_handler = value 2Ye4e!e
1007 else:
1008 exception_handlers[key] = value 2a 'e(e)e*e+e,e-e.eBe1d2d3d4d/e5d:eWe;e^ _ =e?e6d@e` { [e7d]e^e8dCe| } _e`e{e|e}e~eafbfcfdfefffgf~ hfifjfabbbkflfXemfnfofYepfqfrf9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j[j]j^j_j`j{j|j}j~jakbkckdkek|dfk3b4b5b6b7b8b9bgkhkikjkkklk!bmk#b$b%b'b( Y ) (b)b* nk*b+bok}d+ y pk~dqkrksktkukvkwkxkykzkAkBkCkDkEkFkGkHkIkJkKkLkMkNkOkPkQkRkSkTkUkVkWkXkYkZk0k1k2k3k4k5k6kae,b-b7kJe8k9k!k#k$k%k'k(k)k*k+k,k-k.k/k5e6e7e:k;k=k?k@k[k]k^k_k`k{k|k}k~kalblcldlelflf md.bKeLeMeglhliljlklllmlnlolplqlrlsltlulvlwlxlylzlAlBlClbeDlElFlGl/bHlIlJlKl:bLlMlNlOlPlQlRlSlTlUlVlWlXlYlZl0l1l2l3l4l5l6l7l8l9l!l#l$l%l'l(l)l*l+lce,l-l.l/l:l;l=l?l@l[l]l^l_l`l{l|l}l~lambmcmdmemfmgmhmimjmkmlmmmnmompmqmrmsmtmumvmwmxmymzmAmBmCmDmEmFmGmHmImJmKmLmMmNmOmPmQmRmSmTmUmVmWmXmYmZm0m1m2m3m4m5m6m7m8m9m!m#m$m%m'm(m)m*m+m,m-m.mde/m:m;m=m?m;b@m, [m]m^m_m`m{m=b|mR ee}m~manbncndnenfngnfe?bhnin@b[b]bc jnknlnmnnnonpnqnNegeheiejernkesn8etn^b_bunvnlewn`b{bxnmeynznneOe|b}bAnBnCnDnEnFnGnHnInJnKnLnMn~bNnOnPnacbcQnRn9eSnTnUn!eVnWnXnoeYnZn0n1n2nz S A B C D E T 3n4npe5n6n7n8n9ncc!ndc#n$n%n'nVe(nqe)n*n- . / F G : ; +n,n-n.n/n:n;n=n?necfcU gchcV icjckc@n[n]n^nre_n`n{n|n}n~naobocodoeofogohoiojokolomonooopoqorosotouosevolcmcncocpcqcrcwoxoyozoAoBoscCotcucvcwc= Z ? xcyc@ DozcAcEote[ H FoueGoHoIoJoKoLoMoNoOoPoQoRoSoToUoVoWoXoYoZo0o1o2o3o4o5o6o7o8o9o!o#o$o%o'o(o)o*o+o,o-o.o/oveBc:o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mlmmmnmompmqmrmsmtmumvmwmxmymzmAmBmCmDmEmFmGmHmImJmKmLmMmNmOmPmQmRmSmTmUmVmWmXmYmZm0m1m2m3m4m5m6m7m8m9m!m#m$m%m'm(m)m*m+m,m-m.mde/m:m;m=m?m;b@m, [m]m^m_m`m{m=b|mR ee}m~manbncndnenfngnfe?bhnin@b[b]bc jnknlnmnnnonpnqnNegeheiejernkesn8etn^b_bunvnlewn`b{bxnmeynznneOe|b}bAnBnCnDnEnFnGnHnInJnKnLnMn~bNnOnPnacbcQnRn9eSnTnUn!eVnWnXnoeYnZn0n1n2nz S A B C D E T 3n4npe5n6n7n8n9ncc!ndc#n$n%n'nVe(nqe)n*n- . / F G : ; +n,n-n.n/n:n;n=n?necfcU gchcV icjckc@n[n]n^nre_n`n{n|n}n~naobocodoeofogohoiojokolomonooopoqorosotouosevolcmcncocpcqcrcwoxoyozoAoBoscCotcucvcwc= Z ? xcyc@ DozcAcEote[ H FoueGoHoIoJoKoLoMoNoOoPoQoRoSoToUoVoWoXoYoZo0o1o2o3o4o5o6o7o8o9o!o#o$o%o'o(o)o*o+o,o-o.o/oveBc:oPe;o=o?o@o[o]o^o_o`o{o|o}o~oapbp#e$e%ecpdpepfpgphpipjpkplpmpnpopppqprpsptpupvpg XdCcQeReSewpxpypzpApBpCpDpEpFpGpHpIpJpKpLpMpNpOpPpQpRpSpweTpUpVpWpDcXpYpZp0pEc1p2p3p4p5p6p7p8p9p!p#p$p%p'p(p)p*p+p,p-p.p/p:p;p=p?p@p[p]p^p_p`p{p|pxe}p~paqbqcqdqeqfqgqhqiqjqkqlqmqnqoqpqqqrqsqtquqvqwqxqyqzqAqBqCqDqEqFqGqHqIqJqKqLqMqNqOqPqQqRqSqTqUqVqWqXqYqZq0q1q2q3q4q5q6q7q8q9q!q#q$q%q'q(q)q*q+q,q-q.q/q:q;q=q?q@q[q]q^q_q`q{q|q}q~qaryebrcrdrerfrFcgr] hrirjrkrlrmrGcnrW zeorprqrrrsrtrurvrwrAeHcxryrIcJcKc
1011 [Middleware(ServerErrorMiddleware, handler=error_handler, debug=debug)]
1012 + self.user_middleware
1013 + [
1014 Middleware(
1015 ExceptionMiddleware, handlers=exception_handlers, debug=debug
1016 ),
1017 # Add FastAPI-specific AsyncExitStackMiddleware for closing files.
1018 # Before this was also used for closing dependencies with yield but
1019 # those now have their own AsyncExitStack, to properly support
1020 # streaming responses while keeping compatibility with the previous
1021 # versions (as of writing 0.117.1) that allowed doing
1022 # except HTTPException inside a dependency with yield.
1023 # This needs to happen after user middlewares because those create a
1024 # new contextvars context copy by using a new AnyIO task group.
1025 # This AsyncExitStack preserves the context for contextvars, not
1026 # strictly necessary for closing files but it was one of the original
1027 # intentions.
1028 # If the AsyncExitStack lived outside of the custom middlewares and
1029 # contextvars were set, for example in a dependency with 'yield'
1030 # in that internal contextvars context, the values would not be
1031 # available in the outer context of the AsyncExitStack.
1032 # By placing the middleware and the AsyncExitStack here, inside all
1033 # user middlewares, the same context is used.
1034 # This is currently not needed, only for closing files, but used to be
1035 # important when dependencies with yield were closed here.
1036 Middleware(AsyncExitStackMiddleware),
1037 ]
1038 )
1040 app = self.router 2a 'e(e)e*e+e,e-e.eBe1d2d3d4d/e5d:eWe;e^ _ =e?e6d@e` { [e7d]e^e8dCe| } _e`e{e|e}e~eafbfcfdfefffgf~ hfifjfabbbkflfXemfnfofYepfqfrf9dsftfufvfwfh I i j k l m J xfyf!dzfAfBfCfDfcbEfdbFfGfHfIfTeJf#dKfLf0 1 2 n o 3 4 MfNfOfPfQfRfSfTfUfebfbK gbhbL ibjbkbVfWfXfYf$dZf0f1f2f3f4f5f6f7f8f9f!f#f$f%f'f(f)f*f+f,f-f.f/f:f;f=f%d?flbmbnbobpbqbrb@f[f]f^f_f`fsb{ftbubvbwb5 X 6 xbyb7 |fzbAb}f'd8 p ~f(dagbgcgdgegfggghgigjgkglgmgngogpgqgrgsgtgugvgwgxgygzgAgBgCgDgEgFgGgHgIgJgKgLgMgNgOgPgQg)dBbRgDe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LlMlNlOlPlQlRlSlTlUlVlWlXlYlZl0l1l2l3l4l5l6l7l8l9l!l#l$l%l'l(l)l*l+lce,l-l.l/l:l;l=l?l@l[l]l^l_l`l{l|l}l~lambmcmdmemfmgmhmimjmkmlmmmnmompmqmrmsmtmumvmwmxmymzmAmBmCmDmEmFmGmHmImJmKmLmMmNmOmPmQmRmSmTmUmVmWmXmYmZm0m1m2m3m4m5m6m7m8m9m!m#m$m%m'm(m)m*m+m,m-m.mde/m:m;m=m?m;b@m, [m]m^m_m`m{m=b|mR ee}m~manbncndnenfngnfe?bhnin@b[b]bc jnknlnmnnnonpnqnNegeheiejernkesn8etn^b_bunvnlewn`b{bxnmeynznneOe|b}bAnBnCnDnEnFnGnHnInJnKnLnMn~bNnOnPnacbcQnRn9eSnTnUn!eVnWnXnoeYnZn0n1n2nz S A B C D E T 3n4npe5n6n7n8n9ncc!ndc#n$n%n'nVe(nqe)n*n- . / F G : ; +n,n-n.n/n:n;n=n?necfcU gchcV icjckc@n[n]n^nre_n`n{n|n}n~naobocodoeofogohoiojokolomonooopoqorosotouosevolcmcncocpcqcrcwoxoyozoAoBoscCotcucvcwc= Z ? xcyc@ DozcAcEote[ H FoueGoHoIoJoKoLoMoNoOoPoQoRoSoToUoVoWoXoYoZo0o1o2o3o4o5o6o7o8o9o!o#o$o%o'o(o)o*o+o,o-o.o/oveBc:oPe;o=o?o@o[o]o^o_o`o{o|o}o~oapbp#e$e%ecpdpepfpgphpipjpkplpmpnpopppqprpsptpupvpg XdCcQeReSewpxpypzpApBpCpDpEpFpGpHpIpJpKpLpMpNpOpPpQpRpSpweTpUpVpWpDcXpYpZp0pEc1p2p3p4p5p6p7p8p9p!p#p$p%p'p(p)p*p+p,p-p.p/p:p;p=p?p@p[p]p^p_p`p{p|pxe}p~paqbqcqdqeqfqgqhqiqjqkqlqmqnqoqpqqqrqsqtquqvqwqxqyqzqAqBqCqDqEqFqGqHqIqJqKqLqMqNqOqPqQqRqSqTqUqVqWqXqYqZq0q1q2q3q4q5q6q7q8q9q!q#q$q%q'q(q)q*q+q,q-q.q/q:q;q=q?q@q[q]q^q_q`q{q|q}q~qaryebrcrdrerfrFcgr] hrirjrkrlrmrGcnrW zeorprqrrrsrtrurvrwrAeHcxryrIcJcKc
1041 for cls, args, kwargs in reversed(middleware): 2a 'e(e)e*e+e,e-e.eBe1d2d3d4d/e5d:eWe;e^ _ =e?e6d@e` { [e7d]e^e8dCe| } _e`e{e|e}e~eafbfcfdfefffgf~ hfifjfabbbkflfXemfnfofYepfqfrf9dsftfufvfwfh I i j k l m J xfyf!dzfAfBfCfDfcbEfdbFfGfHfIfTeJf#dKfLf0 1 2 n o 3 4 MfNfOfPfQfRfSfTfUfebfbK gbhbL ibjbkbVfWfXfYf$dZf0f1f2f3f4f5f6f7f8f9f!f#f$f%f'f(f)f*f+f,f-f.f/f:f;f=f%d?flbmbnbobpbqbrb@f[f]f^f_f`fsb{ftbubvbwb5 X 6 xbyb7 |fzbAb}f'd8 p ~f(dagbgcgdgegfggghgigjgkglgmgngogpgqgrgsgtgugvgwgxgygzgAgBgCgDgEgFgGgHgIgJgKgLgMgNgOgPgQg)dBbRgDeSgTgUgVgWgXgYgZg0g1g2g3g4g5g6gZe0e1e7g8g9g!g#g$g%g'g(g)g*g+g,g-g.g/g:g;g=g?ge +cCbEeFeGe@g[g]g^g_g`g{g|g}g~gahbhchdhehfhghhhihjhkhlhmh*dnhohphqhDbrhshthuhEbvhwhxhyhzhAhBhChDhEhFhGhHhIhJhKhLhMhNhOhPhQhRhShThUhVhWhXhYhZh0h1h2h+d3h4h5h6h7h8h9h!h#h$h%h'h(h)h*h+h,h-h.h/h:h;h=h?h@h[h]h^h_h`h{h|h}h~haibicidieifigihiiijikiliminioipiqirisitiuiviwixiyiziAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi0i1i2i3i4i5i,d6i7i8i9i!iFb#i9 $i%i'i(i)i*iGb+iM -d,i-i.i/i:i;i=i?i@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A B C D E T 3n4npe5n6n7n8n9ncc!ndc#n$n%n'nVe(nqe)n*n- . / F G : ; +n,n-n.n/n:n;n=n?necfcU gchcV icjckc@n[n]n^nre_n`n{n|n}n~naobocodoeofogohoiojokolomonooopoqorosotouosevolcmcncocpcqcrcwoxoyozoAoBoscCotcucvcwc= Z ? xcyc@ DozcAcEote[ H FoueGoHoIoJoKoLoMoNoOoPoQoRoSoToUoVoWoXoYoZo0o1o2o3o4o5o6o7o8o9o!o#o$o%o'o(o)o*o+o,o-o.o/oveBc:oPe;o=o?o@o[o]o^o_o`o{o|o}o~oapbp#e$e%ecpdpepfpgphpipjpkplpmpnpopppqprpsptpupvpg XdCcQeReSewpxpypzpApBpCpDpEpFpGpHpIpJpKpLpMpNpOpPpQpRpSpweTpUpVpWpDcXpYpZp0pEc1p2p3p4p5p6p7p8p9p!p#p$p%p'p(p)p*p+p,p-p.p/p:p;p=p?p@p[p]p^p_p`p{p|pxe}p~paqbqcqdqeqfqgqhqiqjqkqlqmqnqoqpqqqrqsqtquqvqwqxqyqzqAqBqCqDqEqFqGqHqIqJqKqLqMqNqOqPqQqRqSqTqUqVqWqXqYqZq0q1q2q3q4q5q6q7q8q9q!q#q$q%q'q(q)q*q+q,q-q.q/q:q;q=q?q@q[q]q^q_q`q{q|q}q~qaryebrcrdrerfrFcgr] hrirjrkrlrmrGcnrW zeorprqrrrsrtrurvrwrAeHcxryrIcJcKc
1042 app = cls(app, *args, **kwargs) 2a 'e(e)e*e+e,e-e.eBe1d2d3d4d/e5d:eWe;e^ _ =e?e6d@e` { [e7d]e^e8dCe| } _e`e{e|e}e~eafbfcfdfefffgf~ hfifjfabbbkflfXemfnfofYepfqfrf9dsftfufvfwfh I i j k l m J xfyf!dzfAfBfCfDfcbEfdbFfGfHfIfTeJf#dKfLf0 1 2 n o 3 4 MfNfOfPfQfRfSfTfUfebfbK gbhbL ibjbkbVfWfXfYf$dZf0f1f2f3f4f5f6f7f8f9f!f#f$f%f'f(f)f*f+f,f-f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kZk0k1k2k3k4k5k6kae,b-b7kJe8k9k!k#k$k%k'k(k)k*k+k,k-k.k/k5e6e7e:k;k=k?k@k[k]k^k_k`k{k|k}k~kalblcldlelflf md.bKeLeMeglhliljlklllmlnlolplqlrlsltlulvlwlxlylzlAlBlClbeDlElFlGl/bHlIlJlKl:bLlMlNlOlPlQlRlSlTlUlVlWlXlYlZl0l1l2l3l4l5l6l7l8l9l!l#l$l%l'l(l)l*l+lce,l-l.l/l:l;l=l?l@l[l]l^l_l`l{l|l}l~lambmcmdmemfmgmhmimjmkmlmmmnmompmqmrmsmtmumvmwmxmymzmAmBmCmDmEmFmGmHmImJmKmLmMmNmOmPmQmRmSmTmUmVmWmXmYmZm0m1m2m3m4m5m6m7m8m9m!m#m$m%m'm(m)m*m+m,m-m.mde/m:m;m=m?m;b@m, [m]m^m_m`m{m=b|mR ee}m~manbncndnenfngnfe?bhnin@b[b]bc jnknlnmnnnonpnqnNegeheiejernkesn8etn^b_bunvnlewn`b{bxnmeynznneOe|b}bAnBnCnDnEnFnGnHnInJnKnLnMn~bNnOnPnacbcQnRn9eSnTnUn!eVnWnXnoeYnZn0n1n2nz S A B C D E T 3n4npe5n6n7n8n9ncc!ndc#n$n%n'nVe(nqe)n*n- . / F G : ; +n,n-n.n/n:n;n=n?necfcU gchcV icjckc@n[n]n^nre_n`n{n|n}n~naobocodoeofogohoiojokolomonooopoqorosotouosevolcmcncocpcqcrcwoxoyozoAoBoscCotcucvcwc= Z ? xcyc@ DozcAcEote[ H FoueGoHoIoJoKoLoMoNoOoPoQoRoSoToUoVoWoXoYoZo0o1o2o3o4o5o6o7o8o9o!o#o$o%o'o(o)o*o+o,o-o.o/oveBc:oPe;o=o?o@o[o]o^o_o`o{o|o}o~oapbp#e$e%ecpdpepfpgphpipjpkplpmpnpopppqprpsptpupvpg XdCcQeReSewpxpypzpApBpCpDpEpFpGpHpIpJpKpLpMpNpOpPpQpRpSpweTpUpVpWpDcXpYpZp0pEc1p2p3p4p5p6p7p8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bncndnenfngnfe?bhnin@b[b]bc jnknlnmnnnonpnqnNegeheiejernkesn8etn^b_bunvnlewn`b{bxnmeynznneOe|b}bAnBnCnDnEnFnGnHnInJnKnLnMn~bNnOnPnacbcQnRn9eSnTnUn!eVnWnXnoeYnZn0n1n2nz S A B C D E T 3n4npe5n6n7n8n9ncc!ndc#n$n%n'nVe(nqe)n*n- . / F G : ; +n,n-n.n/n:n;n=n?necfcU gchcV icjckc@n[n]n^nre_n`n{n|n}n~naobocodoeofogohoiojokolomonooopoqorosotouosevolcmcncocpcqcrcwoxoyozoAoBoscCotcucvcwc= Z ? xcyc@ DozcAcEote[ H FoueGoHoIoJoKoLoMoNoOoPoQoRoSoToUoVoWoXoYoZo0o1o2o3o4o5o6o7o8o9o!o#o$o%o'o(o)o*o+o,o-o.o/oveBc:oPe;o=o?o@o[o]o^o_o`o{o|o}o~oapbp#e$e%ecpdpepfpgphpipjpkplpmpnpopppqprpsptpupvpg XdCcQeReSewpxpypzpApBpCpDpEpFpGpHpIpJpKpLpMpNpOpPpQpRpSpweTpUpVpWpDcXpYpZp0pEc1p2p3p4p5p6p7p8p9p!p#p$p%p'p(p)p*p+p,p-p.p/p:p;p=p?p@p[p]p^p_p`p{p|pxe}p~paqbqcqdqeqfqgqhqiqjqkqlqmqnqoqpqqqrqsqtquqvqwqxqyqzqAqBqCqDqEqFqGqHqIqJqKqLqMqNqOqPqQqRqSqTqUqVqWqXqYqZq0q1q2q3q4q5q6q7q8q9q!q#q$q%q'q(q)q*q+q,q-q.q/q:q;q=q?q@q[q]q^q_q`q{q|q}q~qaryebrcrdrerfrFcgr] hrirjrkrlrmrGcnrW zeorprqrrrsrtrurvrwrAeHcxryrIcJcKc
1045 def openapi(self) -> dict[str, Any]: 1abdc
1046 """
1047 Generate the OpenAPI schema of the application. This is called by FastAPI
1048 internally.
1050 The first time it is called it stores the result in the attribute
1051 `app.openapi_schema`, and next times it is called, it just returns that same
1052 result. To avoid the cost of generating the schema every time.
1054 If you need to modify the generated OpenAPI schema, you could modify it.
1056 Read more in the
1057 [FastAPI docs for OpenAPI](https://fastapi.tiangolo.com/how-to/extending-openapi/).
1058 """
1059 if not self.openapi_schema: 2RrSrTrBe1d2d3d4dUr5dVrWr6d7dXr8dYrzrZr0r1r9d2rh I i j k l m J 3r!d4r5r6r7r8r9r!r#r#d$r%rn o 'r(r)r*rK L +r,r-r$d!A#A;z$A%A'A=z(A)A*A?z+A,A-A@z.A/A:A[z;A=A?A]z@A[A]A^z^A_A`A_z{A|A}A`z~AaBbB{zcBdBeB|zfBgBhB}ziBjBkB~zlBmBnBaAoBpBqBbArBsBtBcAuBvBwBdAxByBzBeAABfABBCBgADBEBFBhAGBHBIBiAJBKBLBjAMB.r%d/r:r;r'dp (d=r?r@r[r]r^r_r`r{r|r}r~rasbscsdsesfsgshsisjskslsmsnsospsqsrssstsusvs)dwsxsyszsAsBsCsDsIrArBrOrEsFsGsHsIsJsKsLsMsNsOsPsQsRsSsTsUsVsWsXse YsZs0s1s2s3s4s5s6s7s8s9s!s*d#s$s%s's(s)s*s+s,s-s.s/s:s;s=s?s@s[s]sNB^s_s`s{s|s}s~satbtctdtetftgthtitjtkt5z+dltmtntotptqtrtstttutvtwtxtytztAtBtCtDtEtFtGtHtItJtKtLtMtNtOtPtQtRtStTtUtVtWtXtYtZt0t1t2t3t4t5t6t7t8t9t!t#t$t%t't(t)t*t+t,t-t.t/t:t;t=t?t@t[t]t^t_t`t{t|t}t~taubucudueufuguhu,diujukuluJrmunuoupuM -dquru.dsutuuuHe/d:d;d=dvu?dwuxu@d[dyu]dzuCrAuBuCu^dDuq N r s t u v O Eu_dFuGuHuIuJuKuLuMu`dNuOuw x PuQuRuSuP Q TuUuVu{dOBPBkAQBRBSBlATBUBVBmAWBXBYBnAZB0B1BoA2B3B4BpA5B6B7BqA8B9B!BrA#B$B%BsA'B(B)BtA*B+B,BuA-B.B/BvA:B;B=BwA?B@B[BxA]B^B_ByA`B{B|BzA}B~BaCAAbCcCdCBAeCC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.y/y:y;y=y?y@y[y]y^y_y`y{y|y}y~yazbzczdzezfzgzhzizjzkzlzmznzozpzqzrzsztzuzvzwzxzyzzzAzBzCzDzEzFzGzHzIzJzKzLzMzNzOzPzQzRzSzTzUzyeVzWzXzYzNrZz0z1z2zW ze3z4zAe
1060 self.openapi_schema = get_openapi( 2RrSrTrBe1d2d3d4dUr5dVrWr6d7dXr8dYrzrZr0r1r9d2rh I i j k l m J 3r!d4r5r6r7r8r9r!r#r#d$r%rn o 'r(r)r*rK L +r,r-r$d;z=z?z@z[z]z^z_z`z{z|z}z~zaAbAcAdAeAfAgAhAiAjA.r%d/r:r;r'dp (d=r?r@r[r]r^r_r`r{r|r}r~rasbscsdsesfsgshsisjskslsmsnsospsqsrssstsusvs)dwsxsyszsAsBsCsDsIrArBrOrEsFsGsHsIsJsKsLsMsNsOsPsQsRsSsTsUsVsWsXse YsZs0s1s2s3s4s5s6s7s8s9s!s*d#s$s%s's(s)s*s+s,s-s.s/s:s;s=s?s@s[s]s^s_s`s{s|s}s~satbtctdtetftgthtitjtkt+dltmtntotptqtrtstttutvtwtxtytztAtBtCtDtEtFtGtHtItJtKtLtMtNtOtPtQtRtStTtUtVtWtXtYtZt0t1t2t3t4t5t6t7t8t9t!t#t$t%t't(t)t*t+t,t-t.t/t:t;t=t?t@t[t]t^t_t`t{t|t}t~taubucudueufuguhu,diujukuluJrmunuoupuM -dquru.dsutuuuHe/d:d;d=dvu?dwuxu@d[dyu]dzuCrAuBuCu^dDuq N r s t u v O Eu_dFuGuHuIuJuKuLuMu`dNuOuw x PuQuRuSuP Q TuUuVu{dkAlAmAnAoApAqArAsAtAuAvAwAxAyAzAAABACADAEAFAGAWu|dXuYuZu}dy ~d0u1u2u3u4u5u6u7u8u9u!u#u$u%u'u(u)u*u+u,u-u.u/u:u;u=u?u@u[u]u^u_u`u{uae|u}u~uavbvcvdvevKrDrErPrfvgvhvivjvkvlvmvnvovpvqvrvsvtvuvvvwvxvyvf zvAvBvCvDvEvFvGvHvIvJvKvLvbeMvNvOvPvQvRvSvTvUvVvWvXvYvZv0v1v2v3v4v5v6v7v8v9v!v#v$v%v'v(v)v*v+v,v-v.v/vce:v;v=v?v@v[v]v^v_v`v{v|v}v~vawbwcwdwewfwgwhwiwjwkwlwmwnwowpwqwrwswtwuwvwwwxwywzwAwBwCwDwEwFwGwHwIwJwKwLwMwNwOwPwQwRwSwTwUwVwWwXwYwZw0w1w2w3w4w5w6w7w8w9w!w#w$w%w'w(w)w*w+w,wde-w.w/w:wLr;w=w?w@wR ee[w]wfe^w_w`wNegeheieje{wke|w}wleme~wneaxFrbxcxdxoeexz S A B C D E T fxpegxhxixjxkxlxmxnxqeoxpxF G qxrxsxtxU V uxvxwxreHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZA0A1A2A3AxxseyxzxAxteH ueBxCxDxExFxGxHxIxJxKxLxMxNxOxPxQxRxSxTxUxVxWxXxYxZx0x1x2x3x4x5x6x7x8xve9x!x#x$x%x'x(x)xMrGrHrQr*x+x,x-x.x/x:x;x=x?x@x[x]x^x_x`x{x|x}x~xg aybycydyeyfygyhyiyjykylymywenyoypyqyrysytyuyvywyxyyyzyAyByCyDyEyFyGyHyIyJyKyLyMyNyOyPyQyRySyTyUyVyWyXyxeYyZy0y1y2y3y4y5y6y7y8y9y!y#y$y%y'y(y)y*y+y,y-y.y/y:y;y=y?y@y[y]y^y_y`y{y|y}y~yazbzczdzezfzgzhzizjzkzlzmznzozpzqzrzsztzuzvzwzxzyzzzAzBzCzDzEzFzGzHzIzJzKzLzMzNzOzPzQzRzSzTzUzyeVzWzXzYzNrZz0z1z2zW ze3z4zAe
1061 title=self.title,
1062 version=self.version,
1063 openapi_version=self.openapi_version,
1064 summary=self.summary,
1065 description=self.description,
1066 terms_of_service=self.terms_of_service,
1067 contact=self.contact,
1068 license_info=self.license_info,
1069 routes=self.routes,
1070 webhooks=self.webhooks.routes,
1071 tags=self.openapi_tags,
1072 servers=self.servers,
1073 separate_input_output_schemas=self.separate_input_output_schemas,
1074 external_docs=self.openapi_external_docs,
1075 )
1076 return self.openapi_schema 2RrSrTr1d2d3d4dUr5dVrWr6d7dXr8dYrzrZr0r1r9d2rh I i j k l m J 3r!d4r5r6r7r8r9r!r#r#d$r%rn o 'r(r)r*rK L +r,r-r$d!A#A;z$A%A'A=z(A)A*A?z+A,A-A@z.A/A:A[z;A=A?A]z@A[A]A^z^A_A`A_z{A|A}A`z~AaBbB{zcBdBeB|zfBgBhB}ziBjBkB~zlBmBnBaAoBpBqBbArBsBtBcAuBvBwBdAxByBzBeAABfABBCBgADBEBFBhAGBHBIBiAJBKBLBjAMB.r%d/r:r;r'dp (d=r?r@r[r]r^r_r`r{r|r}r~rasbscsdsesfsgshsisjskslsmsnsospsqsrssstsusvs)dwsxsyszsAsBsCsDsIrArBrOrEsFsGsHsIsJsKsLsMsNsOsPsQsRsSsTsUsVsWsXse YsZs0s1s2s3s4s5s6s7s8s9s!s*d#s$s%s's(s)s*s+s,s-s.s/s:s;s=s?s@s[s]sNB^s_s`s{s|s}s~satbtctdtetftgthtitjtkt5z+dltmtntotptqtrtstttutvtwtxtytztAtBtCtDtEtFtGtHtItJtKtLtMtNtOtPtQtRtStTtUtVtWtXtYtZt0t1t2t3t4t5t6t7t8t9t!t#t$t%t't(t)t*t+t,t-t.t/t:t;t=t?t@t[t]t^t_t`t{t|t}t~taubucudueufuguhu,diujukuluJrmunuoupuM -dquru.dsutuuu/d:d;d=dvu?dwuxu@d[dyu]dzuCrAuBuCu^dDuq N r s t u v O Eu_dFuGuHuIuJuKuLuMu`dNuOuw x PuQuRuSuP Q TuUuVu{dOBPBkAQBRBSBlATBUBVBmAWBXBYBnAZB0B1BoA2B3B4BpA5B6B7BqA8B9B!BrA#B$B%BsA'B(B)BtA*B+B,BuA-B.B/BvA:B;B=BwA?B@B[BxA]B^B_ByA`B{B|BzA}B~BaCAAbCcCdCBAeCCAfCgCDAhCiCjCEAkClCmCFAnCoCpCGAqCWu|dXuYuZu}dy ~d0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lzmznzozpzqzrzsztzuzvzwzxzyzzzAzBzCzDzEzFzGzHzIzJzKzLzMzNzOzPzQzRzSzTzUzyeVzWzXzYzNrZz0z1z2zW ze3z4zAe
1078 def setup(self) -> None: 1abdc
1079 if self.openapi_url: 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
1080 urls = (server_data.get("url") for server_data in self.servers) 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe Cb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf .bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg CcYdZdDcEc0dFc] GcW HcIcJcKc
1081 server_urls = {url for url in urls if url} 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe Cb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf .bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg CcYdZdDcEc0dFc] GcW HcIcJcKc
1083 async def openapi(req: Request) -> JSONResponse: 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe Cb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf .bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg CcYdZdDcEc0dFc] GcW HcIcJcKc
1084 root_path = req.scope.get("root_path", "").rstrip("/") 2RrSrTrBe1d2d3d4dUr5dVrWr6d7dXr8dYrzrZr0r1r9d2rh I i j k l m J 3r!d4r5r6r7r8r9r!r#r#d$r%rn o 'r(r)r*rK L +r,r-r$d.r%d/r:r;r'dp (d=r?r@r[r]r^r_r`r{r|r}r~rasbscsdsesfsgshsisjskslsmsnsospsqsrssstsusvs)dwsxsyszsAsBsCsDsIrArBrOrEsFsGsHsIsJsKsLsMsNsOsPsQsRsSsTsUsVsWsXse YsZs0s1s2s3s4s5s6s7s8s9s!s*d#s$s%s's(s)s*s+s,s-s(z.s/s:s;s=s?s@s[s]s^s_s`s{s|s}s~satbtctdtetftgthtitjtkt5z+dltmtntotptqtrtstttutvtwtxtytztAtBtCtDtEtFtGtHtItJtKtLtMtNtOtPtQtRtStTtUtVtWtXtYtZt0t1t2t3t4t5t6t7t8t9t!t#t$t%t't(t)t*t+t,t-t.t/t:t;t=t?t@t[t]t^t_t`t{t|t}t~taubucudueufuguhu,diujukuluJrmunuoupuM -dquru.dsutuuuHe/d:d;d=dvu?dwuxu@d[dyu]dzuCrAuBuCu^dDuq N r s t u v O Eu_dFuGuHuIuJuKuLuMu`dNuOuw x PuQuRuSuP Q TuUuVu{dWu|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egeheieje{wke|w}wleme~wneaxFrbxcxdxoeexz S A B C D E T fxpegxhxixjxkxlxmxnxqeoxpxF G qxrxsxtxU V uxvxwxrexxseyxzxAxteH ueBxCxDxExFxGxHxIxJxKxLxMxNxOxPxQxRxSxTxUxVxWxXxYxZx0x1x2x3x4x5x6x7x8xve9x!x#x$x%x'x(x)xMrGrHrQr*x+x,x-x.x/x:x;x=x?x@x[x]x^x_x`x{x|x}x~xg aybycydyeyfygyhyiyjykylymywenyoypyqyrysytyuyvywy*zxyyyzyAyByCyDyEyFyGyHyIyJyKyLyMyNyOyPyQyRySyTyUyVyWyXy7zxeYyZy0y1y2y3y4y5y6y7y8y9y!y#y$y%y'y(y)y*y+y,y-y.y/y:y;y=y?y@y[y]y^y_y`y{y|y}y~yazbzczdzezfzgzhzizjzkzlzmznzozpzqzrzsztzuzvzwzxzyzzzAzBzCzDzEzFzGzHzIzJzKzLzMzNzOzPzQzRzSzTzUzyeVzWzXzYzNrZz0z1z2zW ze3z4zAe
1086 if root_path and self.root_path_in_servers: 2RrSrTrBe1d2d3d4dUr5dVrWr6d7dXr8dYrzrZr0r1r9d2rh I i j k l m J 3r!d4r5r6r7r8r9r!r#r#d$r%rn o 'r(r)r*rK L +r,r-r$d.r%d/r:r;r'dp (d=r?r@r[r]r^r_r`r{r|r}r~rasbscsdsesfsgshsisjskslsmsnsospsqsrssstsusvs)dwsxsyszsAsBsCsDsIrArBrOrEsFsGsHsIsJsKsLsMsNsOsPsQsRsSsTsUsVsWsXse YsZs0s1s2s3s4s5s6s7s8s9s!s*d#s$s%s's(s)s*s+s,s-s(z.s/s:s;s=s?s@s[s]s^s_s`s{s|s}s~satbtctdtetftgthtitjtkt5z+dltmtntotptqtrtstttutvtwtxtytztAtBtCtDtEtFtGtHtItJtKtLtMtNtOtPtQtRtStTtUtVtWtXtYtZt0t1t2t3t4t5t6t7t8t9t!t#t$t%t't(t)t*t+t,t-t.t/t:t;t=t?t@t[t]t^t_t`t{t|t}t~taubucudueufugu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zCzDzEzFzGzHzIzJzKzLzMzNzOzPzQzRzSzTzUzyeVzWzXzYzNrZz0z1z2zW ze3z4zAe
1087 self.servers.insert(0, {"url": root_path}) 2zrIrArBrJrCrKrDrErLrFrMrGrHrNr
1088 server_urls.add(root_path) 2zrIrArBrJrCrKrDrErLrFrMrGrHrNr
1089 return JSONResponse(self.openapi()) 2RrSrTrBe1d2d3d4dUr5dVrWr6d7dXr8dYrzrZr0r1r9d2rh I i j k l m J 3r!d4r5r6r7r8r9r!r#r#d$r%rn o 'r(r)r*rK L +r,r-r$d.r%d/r:r;r'dp (d=r?r@r[r]r^r_r`r{r|r}r~rasbscsdsesfsgshsisjskslsmsnsospsqsrssstsusvs)dwsxsyszsAsBsCsDsIrArBrOrEsFsGsHsIsJsKsLsMsNsOsPsQsRsSsTsUsVsWsXse YsZs0s1s2s3s4s5s6s7s8s9s!s*d#s$s%s's(s)s*s+s,s-s(z.s/s:s;s=s?s@s[s]s^s_s`s{s|s}s~satbtctdtetftgthtitjtkt5z+dltmtntotptqtrtstttutvtwtxtytztAtBtCtDtEtFtGtHtItJtKtLtMtNtOtPtQtRtStTtUtVtWtXtYtZt0t1t2t3t4t5t6t7t8t9t!t#t$t%t't(t)t*t+t,t-t.t/t:t;t=t?t@t[t]t^t_t`t{t|t}t~taubucudueufuguhu,diujukuluJrmunuoupuM -dquru.dsutuuuHe/d:d;d=dvu?dwuxu@d[dyu]dzuCrAuBuCu^dDuq N r s t u v O Eu_dFuGuHuIuJuKuLuMu`dNuOuw x PuQuRuSuP Q TuUuVu{dWu|dXuYuZu}dy ~d0u1u2u3u4u5u6u7u8u9u!u#u$u%u'u(u)u*u+u,u-u.u/u:u;u=u?u@u[u]u^u_u`u{uae|u}u~uavbvcvdvevKrDrErPrfvgvhvivjvkvlvmvnvovpvqvrvsvtvuvvvwvxvyvf zvAvBvCvDvEvFvGvHvIvJvKvLvbeMvNvOvPvQvRvSvTvUvVv)zWvXvYvZv0v1v2v3v4v5v6v7v8v9v!v#v$v%v'v(v)v*v+v,v-v.v/v6zce:v;v=v?v@v[v]v^v_v`v{v|v}v~vawbwcwdwewfwgwhwiwjwkwlwmwnwowpwqwrwswtwuwvwwwxwywzwAwBwCwDwEwFwGwHwIwJwKwLwMwNwOwPwQwRwSwTwUwVwWwXwYwZw0w1w2w3w4w5w6w7w8w9w!w#w$w%w'w(w)w*w+w,wde-w.w/w:wLr;w=w?w@wR ee[w]wfe^w_w`wNegeheieje{wke|w}wleme~wneaxFrbxcxdxoeexz S A B C D E T fxpegxhxixjxkxlxmxnxqeoxpxF G qxrxsxtxU V uxvxwxrexxseyxzxAxteH ueBxCxDxExFxGxHxIxJxKxLxMxNxOxPxQxRxSxTxUxVxWxXxYxZx0x1x2x3x4x5x6x7x8xve9x!x#x$x%x'x(x)xMrGrHrQr*x+x,x-x.x/x:x;x=x?x@x[x]x^x_x`x{x|x}x~xg aybycydyeyfygyhyiyjykylymywenyoypyqyrysytyuyvywy*zxyyyzyAyByCyDyEyFyGyHyIyJyKyLyMyNyOyPyQyRySyTyUyVyWyXy7zxeYyZy0y1y2y3y4y5y6y7y8y9y!y#y$y%y'y(y)y*y+y,y-y.y/y:y;y=y?y@y[y]y^y_y`y{y|y}y~yazbzczdzezfzgzhzizjzkzlzmznzozpzqzrzsztzuzvzwzxzyzzzAzBzCzDzEzFzGzHzIzJzKzLzMzNzOzPzQzRzSzTzUzyeVzWzXzYzNrZz0z1z2zW ze3z4zAe
1091 self.add_route(self.openapi_url, openapi, include_in_schema=False) 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe Cb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf .bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg CcYdZdDcEc0dFc] GcW HcIcJcKc
1092 if self.openapi_url and self.docs_url: 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
1094 async def swagger_ui_html(req: Request) -> HTMLResponse: 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe Cb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf .bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg CcYdZdDcEc0dFc] GcW HcIcJcKc
1095 root_path = req.scope.get("root_path", "").rstrip("/") 28zCeTeDee EeFeGe9z!zIeUeJef KeLeMe#z$zOeVePeg QeReSe%z
1096 openapi_url = root_path + self.openapi_url 28zCeTeDee EeFeGe9z!zIeUeJef KeLeMe#z$zOeVePeg QeReSe%z
1097 oauth2_redirect_url = self.swagger_ui_oauth2_redirect_url 28zCeTeDee EeFeGe9z!zIeUeJef KeLeMe#z$zOeVePeg QeReSe%z
1098 if oauth2_redirect_url: 28zCeTeDee EeFeGe9z!zIeUeJef KeLeMe#z$zOeVePeg QeReSe%z
1099 oauth2_redirect_url = root_path + oauth2_redirect_url 28zCeDee EeFeGe9z!zIeJef KeLeMe#z$zOePeg QeReSe%z
1100 return get_swagger_ui_html( 28zCeTeDee EeFeGe9z!zIeUeJef KeLeMe#z$zOeVePeg QeReSe%z
1101 openapi_url=openapi_url,
1102 title=f"{self.title} - Swagger UI",
1103 oauth2_redirect_url=oauth2_redirect_url,
1104 init_oauth=self.swagger_ui_init_oauth,
1105 swagger_ui_parameters=self.swagger_ui_parameters,
1106 )
1108 self.add_route(self.docs_url, swagger_ui_html, include_in_schema=False) 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe Cb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf .bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg CcYdZdDcEc0dFc] GcW HcIcJcKc
1110 if self.swagger_ui_oauth2_redirect_url: 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe Cb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf .bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg CcYdZdDcEc0dFc] GcW HcIcJcKc
1112 async def swagger_ui_redirect(req: Request) -> HTMLResponse: 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe Cb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf .bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg CcYdZdDcEc0dFc] GcW HcIcJcKc
1113 return get_swagger_ui_oauth2_redirect_html() 24A5A6A7A8A9A
1115 self.add_route( 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe Cb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf .bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg CcYdZdDcEc0dFc] GcW HcIcJcKc
1116 self.swagger_ui_oauth2_redirect_url,
1117 swagger_ui_redirect,
1118 include_in_schema=False,
1119 )
1120 if self.openapi_url and self.redoc_url: 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe +cCb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf md.bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg XdCcYdZdDcEc0dFc] GcW HcIcJcKc
1122 async def redoc_html(req: Request) -> HTMLResponse: 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe Cb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf .bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg CcYdZdDcEc0dFc] GcW HcIcJcKc
1123 root_path = req.scope.get("root_path", "").rstrip("/") 2+ze ,zf -zg
1124 openapi_url = root_path + self.openapi_url 2+ze ,zf -zg
1125 return get_redoc_html( 2+ze ,zf -zg
1126 openapi_url=openapi_url, title=f"{self.title} - ReDoc"
1127 )
1129 self.add_route(self.redoc_url, redoc_html, include_in_schema=False) 2a ^ _ ` { | } ~ abbbh I i j k l m J cbLcMcNcOcPcQcRcScTcUcVcdbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 7c8c9c!c#c$cebfbK gbhbL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbubvbwb5 X 6 xbyb7 zbAb8 p Bbe Cb,c-cDbEb.cFb9 GbM HbIbJbKbb LbMbNbObPbQbRbSbTbq N r s t u v O Ub/c:c;c=c?c@c[c]c^c_c`cVb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZbQ 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b$b%b'b( Y ) (b)b* *b+b+ y ,b-bf .bndod/b:bpd;b, =bR ?b@b[b]bd c ^b_b`b{b|b}b~bacbcz S A B C D E T ccqdrdsdtdudvdwdxdydzdAddcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; MdNdOdPdQdRdecfcU gchcV icjckclcmcncocpcqcrcSdTdUdVdWdsctcucvcwc= Z ? xcyc@ zcAc[ H Bcg CcYdZdDcEc0dFc] GcW HcIcJcKc
1131 async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: 1abdc
1132 if self.root_path: 2a 'e(e)e{C*e+e|C}C~CaDbDcDdDeDfDgDhDiDjDkDlDmDnDoDpDqD,eRr-erDSrTr.eBe1d2d3d4d/esDtDuDUr5dvDwDxD:eWe;e^ _ VryD=eWr+z8z4A?e6d@e` { [e7d]ezD^eXr8dADBDCe5A| } _eCDDDEDFDGDHDIDJDKDLDMDNDOD`ePDQDRDSDTDUDVDWDXDYDZD0D1D2D3D4D{e5D6D7D8D|e9D!D}e#D~e$D%D'Daf(D)D*Dbf+D,D-D.D/D:D;D=D?D@D[D]D^D_D`D{D|D}Dcf~DaEdfYrbEcEdEeEeffEgEhEiEjEkElEmEnEoEpEqErEsEtEuEvEwExEyEzEffAEBEgf~ hfCEDEifjfEEabbbkfFEGEHEIEJEKELElfMENEOEPEQEXezrmfZrnfofRE0rYeSETEUEVEWEpfXEYE1rZE0E1Eqf2Erf9dsf3Etfuf4E5E6E7E8E9E!Evf2rwfh I i j k l m J xf3ryf!dzf4rAf#EBf$ECf5r%E'E(E)E*E+E,EDf-E.E6rcb/EEf:E;Edb7rFf=E?E8rGf@EHf[E9rIf!r]ETe^EJf#r#dKf$rLf%r0 1 2 n o 3 4 Mf'rNf_EOf`EPf(rQfRf{E|E}E)r~EaFbFcFdFeFfFgFhFiFjFkFlFmFnFoFpFqFrFsFtFuFvFwFxFyFzFAFBFCFDFEFFFGFHFIFJFKFLFMFNFOFPFQFRFSFTFUFVFWFXFYFZF0F1F2F3F4F5F6F7F8F9F!F#F$F%F'F(F)F*F+F,F-F.F*rSf/FTf:F;F=F?F@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ny=p8!9!!!Oy?p#!$!%!'!Py@pQy[pRy]pSy^pTy_pUy(!`pVy{pWy)!%z*!Xy|p7zxe}pYy~pZyaq0ybq1ycq2y3ydqeq4y5yfq6ygq+!,!7yhq-!.!8yiqjq/!9y!ykq#ylq$ymqnq%yoq:!'ypq(yqq)yrq*y;!sq=!?!@!+y,ytq[!-yuq]!^!.yvq_!`!{!/ywq|!}!~!a#:yxqb#c#d#e#;yyqf#g#h#=yzqi#j#k#?yAq@yBq[yCq]yDqEql#^yFqm#_y`yGqn#o#{yHqp#q#r#|yIqs#t#u#}yJqv#w#~yKqx#y#azLqz#A#bzB#MqC#D#czNqE#F#dzOqG#H#ezI#PqJ#fzK#L#QqM#RqgzN#SqO#hzTqizP#UqQ#jzR#S#T#VqkzlzU#V#WqW#X#mzY#XqZ#0#nzYq1#2#oz3#4#Zq5#6#pz0q7#qz1q8#9#!###rz$#2q%#'#(#)#sz3q*#+#,#-#tz.#/#:#4q;#5q6q7quz8qvz9q!q#q=#?#wz$qxz%qyz'qzz(q)q@#Az*qBz+q[#Cz,qDzEz-q]#Fz.q^#/qGzHz:qIz;qJz=qKz?qLz@q_#[qMz`#]qNz{#|#}#~#^qa$b$c$Ozd$e$f$_qg$h$i$Pzj$k$l$m$n$o$p$q$`qr$s$t$Qzu$v$w$x$y$z$A$B$C$Rz{qD$E$F$Sz|qG$H$I$J$K$}qTzL$~qUzM$aryebrcrdrN$VzO$WzXzP$Q$erYzNrfrFcR$ZzgrS$0zT$U$] V$W$hrX$Y$Z$0$1$1zirjr2$kr3$4$5$6$7$lr8$9$mrGc2z!$nrW zeorpr#$$$3z%$qr4zrr'$($sr)$*$+$,$-$tr.$urvr/$wr:$;$AeHcxr=$?$yrIcJcKc@$[$]$^$_$`${$|$
1136 def add_api_route( 1abdc
1137 self,
1138 path: str,
1139 endpoint: Callable[..., Any],
1140 *,
1141 response_model: Any = Default(None),
1142 status_code: int | None = None,
1143 tags: list[str | Enum] | None = None,
1144 dependencies: Sequence[Depends] | None = None,
1145 summary: str | None = None,
1146 description: str | None = None,
1147 response_description: str = "Successful Response",
1148 responses: dict[int | str, dict[str, Any]] | None = None,
1149 deprecated: bool | None = None,
1150 methods: list[str] | None = None,
1151 operation_id: str | None = None,
1152 response_model_include: IncEx | None = None,
1153 response_model_exclude: IncEx | None = None,
1154 response_model_by_alias: bool = True,
1155 response_model_exclude_unset: bool = False,
1156 response_model_exclude_defaults: bool = False,
1157 response_model_exclude_none: bool = False,
1158 include_in_schema: bool = True,
1159 response_class: type[Response] | DefaultPlaceholder = Default(JSONResponse),
1160 name: str | None = None,
1161 openapi_extra: dict[str, Any] | None = None,
1162 generate_unique_id_function: Callable[[routing.APIRoute], str] = Default(
1163 generate_unique_id
1164 ),
1165 ) -> None:
1166 self.router.add_api_route( 1abdc
1167 path,
1168 endpoint=endpoint,
1169 response_model=response_model,
1170 status_code=status_code,
1171 tags=tags,
1172 dependencies=dependencies,
1173 summary=summary,
1174 description=description,
1175 response_description=response_description,
1176 responses=responses,
1177 deprecated=deprecated,
1178 methods=methods,
1179 operation_id=operation_id,
1180 response_model_include=response_model_include,
1181 response_model_exclude=response_model_exclude,
1182 response_model_by_alias=response_model_by_alias,
1183 response_model_exclude_unset=response_model_exclude_unset,
1184 response_model_exclude_defaults=response_model_exclude_defaults,
1185 response_model_exclude_none=response_model_exclude_none,
1186 include_in_schema=include_in_schema,
1187 response_class=response_class,
1188 name=name,
1189 openapi_extra=openapi_extra,
1190 generate_unique_id_function=generate_unique_id_function,
1191 )
1193 def api_route( 1abdc
1194 self,
1195 path: str,
1196 *,
1197 response_model: Any = Default(None),
1198 status_code: int | None = None,
1199 tags: list[str | Enum] | None = None,
1200 dependencies: Sequence[Depends] | None = None,
1201 summary: str | None = None,
1202 description: str | None = None,
1203 response_description: str = "Successful Response",
1204 responses: dict[int | str, dict[str, Any]] | None = None,
1205 deprecated: bool | None = None,
1206 methods: list[str] | None = None,
1207 operation_id: str | None = None,
1208 response_model_include: IncEx | None = None,
1209 response_model_exclude: IncEx | None = None,
1210 response_model_by_alias: bool = True,
1211 response_model_exclude_unset: bool = False,
1212 response_model_exclude_defaults: bool = False,
1213 response_model_exclude_none: bool = False,
1214 include_in_schema: bool = True,
1215 response_class: type[Response] = Default(JSONResponse),
1216 name: str | None = None,
1217 openapi_extra: dict[str, Any] | None = None,
1218 generate_unique_id_function: Callable[[routing.APIRoute], str] = Default(
1219 generate_unique_id
1220 ),
1221 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
1222 def decorator(func: DecoratedCallable) -> DecoratedCallable: 1abdc
1223 self.router.add_api_route( 1abdc
1224 path,
1225 func,
1226 response_model=response_model,
1227 status_code=status_code,
1228 tags=tags,
1229 dependencies=dependencies,
1230 summary=summary,
1231 description=description,
1232 response_description=response_description,
1233 responses=responses,
1234 deprecated=deprecated,
1235 methods=methods,
1236 operation_id=operation_id,
1237 response_model_include=response_model_include,
1238 response_model_exclude=response_model_exclude,
1239 response_model_by_alias=response_model_by_alias,
1240 response_model_exclude_unset=response_model_exclude_unset,
1241 response_model_exclude_defaults=response_model_exclude_defaults,
1242 response_model_exclude_none=response_model_exclude_none,
1243 include_in_schema=include_in_schema,
1244 response_class=response_class,
1245 name=name,
1246 openapi_extra=openapi_extra,
1247 generate_unique_id_function=generate_unique_id_function,
1248 )
1249 return func 1abdc
1251 return decorator 1abdc
1253 def add_api_websocket_route( 1abdc
1254 self,
1255 path: str,
1256 endpoint: Callable[..., Any],
1257 name: str | None = None,
1258 *,
1259 dependencies: Sequence[Depends] | None = None,
1260 ) -> None:
1261 self.router.add_api_websocket_route( 2a .zb /zd c :z
1262 path,
1263 endpoint,
1264 name=name,
1265 dependencies=dependencies,
1266 )
1268 def websocket( 1abdc
1269 self,
1270 path: Annotated[
1271 str,
1272 Doc(
1273 """
1274 WebSocket path.
1275 """
1276 ),
1277 ],
1278 name: Annotated[
1279 str | None,
1280 Doc(
1281 """
1282 A name for the WebSocket. Only used internally.
1283 """
1284 ),
1285 ] = None,
1286 *,
1287 dependencies: Annotated[
1288 Sequence[Depends] | None,
1289 Doc(
1290 """
1291 A list of dependencies (using `Depends()`) to be used for this
1292 WebSocket.
1294 Read more about it in the
1295 [FastAPI docs for WebSockets](https://fastapi.tiangolo.com/advanced/websockets/).
1296 """
1297 ),
1298 ] = None,
1299 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
1300 """
1301 Decorate a WebSocket function.
1303 Read more about it in the
1304 [FastAPI docs for WebSockets](https://fastapi.tiangolo.com/advanced/websockets/).
1306 **Example**
1308 ```python
1309 from fastapi import FastAPI, WebSocket
1311 app = FastAPI()
1313 @app.websocket("/ws")
1314 async def websocket_endpoint(websocket: WebSocket):
1315 await websocket.accept()
1316 while True:
1317 data = await websocket.receive_text()
1318 await websocket.send_text(f"Message text was: {data}")
1319 ```
1320 """
1322 def decorator(func: DecoratedCallable) -> DecoratedCallable: 2a .zb /zd c :z
1323 self.add_api_websocket_route( 2a .zb /zd c :z
1324 path,
1325 func,
1326 name=name,
1327 dependencies=dependencies,
1328 )
1329 return func 1abdc
1331 return decorator 2a .zb /zd c :z
1333 def include_router( 1abdc
1334 self,
1335 router: Annotated[routing.APIRouter, Doc("The `APIRouter` to include.")],
1336 *,
1337 prefix: Annotated[str, Doc("An optional path prefix for the router.")] = "",
1338 tags: Annotated[
1339 list[str | Enum] | None,
1340 Doc(
1341 """
1342 A list of tags to be applied to all the *path operations* in this
1343 router.
1345 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
1347 Read more about it in the
1348 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
1349 """
1350 ),
1351 ] = None,
1352 dependencies: Annotated[
1353 Sequence[Depends] | None,
1354 Doc(
1355 """
1356 A list of dependencies (using `Depends()`) to be applied to all the
1357 *path operations* in this router.
1359 Read more about it in the
1360 [FastAPI docs for Bigger Applications - Multiple Files](https://fastapi.tiangolo.com/tutorial/bigger-applications/#include-an-apirouter-with-a-custom-prefix-tags-responses-and-dependencies).
1362 **Example**
1364 ```python
1365 from fastapi import Depends, FastAPI
1367 from .dependencies import get_token_header
1368 from .internal import admin
1370 app = FastAPI()
1372 app.include_router(
1373 admin.router,
1374 dependencies=[Depends(get_token_header)],
1375 )
1376 ```
1377 """
1378 ),
1379 ] = None,
1380 responses: Annotated[
1381 dict[int | str, dict[str, Any]] | None,
1382 Doc(
1383 """
1384 Additional responses to be shown in OpenAPI.
1386 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
1388 Read more about it in the
1389 [FastAPI docs for Additional Responses in OpenAPI](https://fastapi.tiangolo.com/advanced/additional-responses/).
1391 And in the
1392 [FastAPI docs for Bigger Applications](https://fastapi.tiangolo.com/tutorial/bigger-applications/#include-an-apirouter-with-a-custom-prefix-tags-responses-and-dependencies).
1393 """
1394 ),
1395 ] = None,
1396 deprecated: Annotated[
1397 bool | None,
1398 Doc(
1399 """
1400 Mark all the *path operations* in this router as deprecated.
1402 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
1404 **Example**
1406 ```python
1407 from fastapi import FastAPI
1409 from .internal import old_api
1411 app = FastAPI()
1413 app.include_router(
1414 old_api.router,
1415 deprecated=True,
1416 )
1417 ```
1418 """
1419 ),
1420 ] = None,
1421 include_in_schema: Annotated[
1422 bool,
1423 Doc(
1424 """
1425 Include (or not) all the *path operations* in this router in the
1426 generated OpenAPI schema.
1428 This affects the generated OpenAPI (e.g. visible at `/docs`).
1430 **Example**
1432 ```python
1433 from fastapi import FastAPI
1435 from .internal import old_api
1437 app = FastAPI()
1439 app.include_router(
1440 old_api.router,
1441 include_in_schema=False,
1442 )
1443 ```
1444 """
1445 ),
1446 ] = True,
1447 default_response_class: Annotated[
1448 type[Response],
1449 Doc(
1450 """
1451 Default response class to be used for the *path operations* in this
1452 router.
1454 Read more in the
1455 [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/#default-response-class).
1457 **Example**
1459 ```python
1460 from fastapi import FastAPI
1461 from fastapi.responses import ORJSONResponse
1463 from .internal import old_api
1465 app = FastAPI()
1467 app.include_router(
1468 old_api.router,
1469 default_response_class=ORJSONResponse,
1470 )
1471 ```
1472 """
1473 ),
1474 ] = Default(JSONResponse),
1475 callbacks: Annotated[
1476 list[BaseRoute] | None,
1477 Doc(
1478 """
1479 List of *path operations* that will be used as OpenAPI callbacks.
1481 This is only for OpenAPI documentation, the callbacks won't be used
1482 directly.
1484 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
1486 Read more about it in the
1487 [FastAPI docs for OpenAPI Callbacks](https://fastapi.tiangolo.com/advanced/openapi-callbacks/).
1488 """
1489 ),
1490 ] = None,
1491 generate_unique_id_function: Annotated[
1492 Callable[[routing.APIRoute], str],
1493 Doc(
1494 """
1495 Customize the function used to generate unique IDs for the *path
1496 operations* shown in the generated OpenAPI.
1498 This is particularly useful when automatically generating clients or
1499 SDKs for your API.
1501 Read more about it in the
1502 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
1503 """
1504 ),
1505 ] = Default(generate_unique_id),
1506 ) -> None:
1507 """
1508 Include an `APIRouter` in the same app.
1510 Read more about it in the
1511 [FastAPI docs for Bigger Applications](https://fastapi.tiangolo.com/tutorial/bigger-applications/).
1513 ## Example
1515 ```python
1516 from fastapi import FastAPI
1518 from .users import users_router
1520 app = FastAPI()
1522 app.include_router(users_router)
1523 ```
1524 """
1525 self.router.include_router( 2a _ }$h i j k l m ubvbX 6 xb7 zbAbIbJbKbb Mb~$q r s t u v $b%bY ) (b* *b+b@b[b]bd c _ba%z A B C D E ucvcZ ? xc@ zcAcIcJcKc
1526 router,
1527 prefix=prefix,
1528 tags=tags,
1529 dependencies=dependencies,
1530 responses=responses,
1531 deprecated=deprecated,
1532 include_in_schema=include_in_schema,
1533 default_response_class=default_response_class,
1534 callbacks=callbacks,
1535 generate_unique_id_function=generate_unique_id_function,
1536 )
1538 def get( 2a b 'zd c
1539 self,
1540 path: Annotated[
1541 str,
1542 Doc(
1543 """
1544 The URL path to be used for this *path operation*.
1546 For example, in `http://example.com/items`, the path is `/items`.
1547 """
1548 ),
1549 ],
1550 *,
1551 response_model: Annotated[
1552 Any,
1553 Doc(
1554 """
1555 The type to use for the response.
1557 It could be any valid Pydantic *field* type. So, it doesn't have to
1558 be a Pydantic model, it could be other things, like a `list`, `dict`,
1559 etc.
1561 It will be used for:
1563 * Documentation: the generated OpenAPI (and the UI at `/docs`) will
1564 show it as the response (JSON Schema).
1565 * Serialization: you could return an arbitrary object and the
1566 `response_model` would be used to serialize that object into the
1567 corresponding JSON.
1568 * Filtering: the JSON sent to the client will only contain the data
1569 (fields) defined in the `response_model`. If you returned an object
1570 that contains an attribute `password` but the `response_model` does
1571 not include that field, the JSON sent to the client would not have
1572 that `password`.
1573 * Validation: whatever you return will be serialized with the
1574 `response_model`, converting any data as necessary to generate the
1575 corresponding JSON. But if the data in the object returned is not
1576 valid, that would mean a violation of the contract with the client,
1577 so it's an error from the API developer. So, FastAPI will raise an
1578 error and return a 500 error code (Internal Server Error).
1580 Read more about it in the
1581 [FastAPI docs for Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).
1582 """
1583 ),
1584 ] = Default(None),
1585 status_code: Annotated[
1586 int | None,
1587 Doc(
1588 """
1589 The default status code to be used for the response.
1591 You could override the status code by returning a response directly.
1593 Read more about it in the
1594 [FastAPI docs for Response Status Code](https://fastapi.tiangolo.com/tutorial/response-status-code/).
1595 """
1596 ),
1597 ] = None,
1598 tags: Annotated[
1599 list[str | Enum] | None,
1600 Doc(
1601 """
1602 A list of tags to be applied to the *path operation*.
1604 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
1606 Read more about it in the
1607 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/#tags).
1608 """
1609 ),
1610 ] = None,
1611 dependencies: Annotated[
1612 Sequence[Depends] | None,
1613 Doc(
1614 """
1615 A list of dependencies (using `Depends()`) to be applied to the
1616 *path operation*.
1618 Read more about it in the
1619 [FastAPI docs for Dependencies in path operation decorators](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-in-path-operation-decorators/).
1620 """
1621 ),
1622 ] = None,
1623 summary: Annotated[
1624 str | None,
1625 Doc(
1626 """
1627 A summary for the *path operation*.
1629 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
1631 Read more about it in the
1632 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
1633 """
1634 ),
1635 ] = None,
1636 description: Annotated[
1637 str | None,
1638 Doc(
1639 """
1640 A description for the *path operation*.
1642 If not provided, it will be extracted automatically from the docstring
1643 of the *path operation function*.
1645 It can contain Markdown.
1647 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
1649 Read more about it in the
1650 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
1651 """
1652 ),
1653 ] = None,
1654 response_description: Annotated[
1655 str,
1656 Doc(
1657 """
1658 The description for the default response.
1660 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
1661 """
1662 ),
1663 ] = "Successful Response",
1664 responses: Annotated[
1665 dict[int | str, dict[str, Any]] | None,
1666 Doc(
1667 """
1668 Additional responses that could be returned by this *path operation*.
1670 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
1671 """
1672 ),
1673 ] = None,
1674 deprecated: Annotated[
1675 bool | None,
1676 Doc(
1677 """
1678 Mark this *path operation* as deprecated.
1680 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
1681 """
1682 ),
1683 ] = None,
1684 operation_id: Annotated[
1685 str | None,
1686 Doc(
1687 """
1688 Custom operation ID to be used by this *path operation*.
1690 By default, it is generated automatically.
1692 If you provide a custom operation ID, you need to make sure it is
1693 unique for the whole API.
1695 You can customize the
1696 operation ID generation with the parameter
1697 `generate_unique_id_function` in the `FastAPI` class.
1699 Read more about it in the
1700 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
1701 """
1702 ),
1703 ] = None,
1704 response_model_include: Annotated[
1705 IncEx | None,
1706 Doc(
1707 """
1708 Configuration passed to Pydantic to include only certain fields in the
1709 response data.
1711 Read more about it in the
1712 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
1713 """
1714 ),
1715 ] = None,
1716 response_model_exclude: Annotated[
1717 IncEx | None,
1718 Doc(
1719 """
1720 Configuration passed to Pydantic to exclude certain fields in the
1721 response data.
1723 Read more about it in the
1724 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
1725 """
1726 ),
1727 ] = None,
1728 response_model_by_alias: Annotated[
1729 bool,
1730 Doc(
1731 """
1732 Configuration passed to Pydantic to define if the response model
1733 should be serialized by alias when an alias is used.
1735 Read more about it in the
1736 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
1737 """
1738 ),
1739 ] = True,
1740 response_model_exclude_unset: Annotated[
1741 bool,
1742 Doc(
1743 """
1744 Configuration passed to Pydantic to define if the response data
1745 should have all the fields, including the ones that were not set and
1746 have their default values. This is different from
1747 `response_model_exclude_defaults` in that if the fields are set,
1748 they will be included in the response, even if the value is the same
1749 as the default.
1751 When `True`, default values are omitted from the response.
1753 Read more about it in the
1754 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
1755 """
1756 ),
1757 ] = False,
1758 response_model_exclude_defaults: Annotated[
1759 bool,
1760 Doc(
1761 """
1762 Configuration passed to Pydantic to define if the response data
1763 should have all the fields, including the ones that have the same value
1764 as the default. This is different from `response_model_exclude_unset`
1765 in that if the fields are set but contain the same default values,
1766 they will be excluded from the response.
1768 When `True`, default values are omitted from the response.
1770 Read more about it in the
1771 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
1772 """
1773 ),
1774 ] = False,
1775 response_model_exclude_none: Annotated[
1776 bool,
1777 Doc(
1778 """
1779 Configuration passed to Pydantic to define if the response data should
1780 exclude fields set to `None`.
1782 This is much simpler (less smart) than `response_model_exclude_unset`
1783 and `response_model_exclude_defaults`. You probably want to use one of
1784 those two instead of this one, as those allow returning `None` values
1785 when it makes sense.
1787 Read more about it in the
1788 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_exclude_none).
1789 """
1790 ),
1791 ] = False,
1792 include_in_schema: Annotated[
1793 bool,
1794 Doc(
1795 """
1796 Include this *path operation* in the generated OpenAPI schema.
1798 This affects the generated OpenAPI (e.g. visible at `/docs`).
1800 Read more about it in the
1801 [FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
1802 """
1803 ),
1804 ] = True,
1805 response_class: Annotated[
1806 type[Response],
1807 Doc(
1808 """
1809 Response class to be used for this *path operation*.
1811 This will not be used if you return a response directly.
1813 Read more about it in the
1814 [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/#redirectresponse).
1815 """
1816 ),
1817 ] = Default(JSONResponse),
1818 name: Annotated[
1819 str | None,
1820 Doc(
1821 """
1822 Name for this *path operation*. Only used internally.
1823 """
1824 ),
1825 ] = None,
1826 callbacks: Annotated[
1827 list[BaseRoute] | None,
1828 Doc(
1829 """
1830 List of *path operations* that will be used as OpenAPI callbacks.
1832 This is only for OpenAPI documentation, the callbacks won't be used
1833 directly.
1835 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
1837 Read more about it in the
1838 [FastAPI docs for OpenAPI Callbacks](https://fastapi.tiangolo.com/advanced/openapi-callbacks/).
1839 """
1840 ),
1841 ] = None,
1842 openapi_extra: Annotated[
1843 dict[str, Any] | None,
1844 Doc(
1845 """
1846 Extra metadata to be included in the OpenAPI schema for this *path
1847 operation*.
1849 Read more about it in the
1850 [FastAPI docs for Path Operation Advanced Configuration](https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/#custom-openapi-path-operation-schema).
1851 """
1852 ),
1853 ] = None,
1854 generate_unique_id_function: Annotated[
1855 Callable[[routing.APIRoute], str],
1856 Doc(
1857 """
1858 Customize the function used to generate unique IDs for the *path
1859 operations* shown in the generated OpenAPI.
1861 This is particularly useful when automatically generating clients or
1862 SDKs for your API.
1864 Read more about it in the
1865 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
1866 """
1867 ),
1868 ] = Default(generate_unique_id),
1869 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
1870 """
1871 Add a *path operation* using an HTTP GET operation.
1873 ## Example
1875 ```python
1876 from fastapi import FastAPI
1878 app = FastAPI()
1880 @app.get("/items/")
1881 def read_items():
1882 return [{"name": "Empanada"}, {"name": "Arepa"}]
1883 ```
1884 """
1885 return self.router.get( 2a Web%^ } ~ abbbc%cbLcMcNcOcPcQcRcScTcUcVc0 1 2 n o 3 4 7c9c!cL ibjbkblbmbnbobpbqbrb%c'c(c)c*csbtbwb5 X 6 yb7 8 p Bbe +cCb,c-cDbEb.cFb9 b 2ed%LbQbRbSbTbe%Ub/c:c;c=c?c@c[c]c^c_c`c! # $ w x % ' Q 0b1b2b3b4b5b6b7b8b9bhdidjdkdld!b#b'b( Y ) )b* + y ,b-bf md.bndod/b:bpd;b, d c 8ef%^b}b~bacbcg%ccqdrdsdtdudvdwdxdydzdAd- . / F G : ; MdOdPdV icjckclcmcncocpcqcrcSdTdUdVdWdsctcwc= Z ? yc@ [ H Bcg XdCcYdZdDcEc0dFc]
1886 path,
1887 response_model=response_model,
1888 status_code=status_code,
1889 tags=tags,
1890 dependencies=dependencies,
1891 summary=summary,
1892 description=description,
1893 response_description=response_description,
1894 responses=responses,
1895 deprecated=deprecated,
1896 operation_id=operation_id,
1897 response_model_include=response_model_include,
1898 response_model_exclude=response_model_exclude,
1899 response_model_by_alias=response_model_by_alias,
1900 response_model_exclude_unset=response_model_exclude_unset,
1901 response_model_exclude_defaults=response_model_exclude_defaults,
1902 response_model_exclude_none=response_model_exclude_none,
1903 include_in_schema=include_in_schema,
1904 response_class=response_class,
1905 name=name,
1906 callbacks=callbacks,
1907 openapi_extra=openapi_extra,
1908 generate_unique_id_function=generate_unique_id_function,
1909 )
1911 def put( 2a b 'zd c
1912 self,
1913 path: Annotated[
1914 str,
1915 Doc(
1916 """
1917 The URL path to be used for this *path operation*.
1919 For example, in `http://example.com/items`, the path is `/items`.
1920 """
1921 ),
1922 ],
1923 *,
1924 response_model: Annotated[
1925 Any,
1926 Doc(
1927 """
1928 The type to use for the response.
1930 It could be any valid Pydantic *field* type. So, it doesn't have to
1931 be a Pydantic model, it could be other things, like a `list`, `dict`,
1932 etc.
1934 It will be used for:
1936 * Documentation: the generated OpenAPI (and the UI at `/docs`) will
1937 show it as the response (JSON Schema).
1938 * Serialization: you could return an arbitrary object and the
1939 `response_model` would be used to serialize that object into the
1940 corresponding JSON.
1941 * Filtering: the JSON sent to the client will only contain the data
1942 (fields) defined in the `response_model`. If you returned an object
1943 that contains an attribute `password` but the `response_model` does
1944 not include that field, the JSON sent to the client would not have
1945 that `password`.
1946 * Validation: whatever you return will be serialized with the
1947 `response_model`, converting any data as necessary to generate the
1948 corresponding JSON. But if the data in the object returned is not
1949 valid, that would mean a violation of the contract with the client,
1950 so it's an error from the API developer. So, FastAPI will raise an
1951 error and return a 500 error code (Internal Server Error).
1953 Read more about it in the
1954 [FastAPI docs for Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).
1955 """
1956 ),
1957 ] = Default(None),
1958 status_code: Annotated[
1959 int | None,
1960 Doc(
1961 """
1962 The default status code to be used for the response.
1964 You could override the status code by returning a response directly.
1966 Read more about it in the
1967 [FastAPI docs for Response Status Code](https://fastapi.tiangolo.com/tutorial/response-status-code/).
1968 """
1969 ),
1970 ] = None,
1971 tags: Annotated[
1972 list[str | Enum] | None,
1973 Doc(
1974 """
1975 A list of tags to be applied to the *path operation*.
1977 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
1979 Read more about it in the
1980 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/#tags).
1981 """
1982 ),
1983 ] = None,
1984 dependencies: Annotated[
1985 Sequence[Depends] | None,
1986 Doc(
1987 """
1988 A list of dependencies (using `Depends()`) to be applied to the
1989 *path operation*.
1991 Read more about it in the
1992 [FastAPI docs for Dependencies in path operation decorators](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-in-path-operation-decorators/).
1993 """
1994 ),
1995 ] = None,
1996 summary: Annotated[
1997 str | None,
1998 Doc(
1999 """
2000 A summary for the *path operation*.
2002 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2004 Read more about it in the
2005 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
2006 """
2007 ),
2008 ] = None,
2009 description: Annotated[
2010 str | None,
2011 Doc(
2012 """
2013 A description for the *path operation*.
2015 If not provided, it will be extracted automatically from the docstring
2016 of the *path operation function*.
2018 It can contain Markdown.
2020 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2022 Read more about it in the
2023 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
2024 """
2025 ),
2026 ] = None,
2027 response_description: Annotated[
2028 str,
2029 Doc(
2030 """
2031 The description for the default response.
2033 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2034 """
2035 ),
2036 ] = "Successful Response",
2037 responses: Annotated[
2038 dict[int | str, dict[str, Any]] | None,
2039 Doc(
2040 """
2041 Additional responses that could be returned by this *path operation*.
2043 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2044 """
2045 ),
2046 ] = None,
2047 deprecated: Annotated[
2048 bool | None,
2049 Doc(
2050 """
2051 Mark this *path operation* as deprecated.
2053 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2054 """
2055 ),
2056 ] = None,
2057 operation_id: Annotated[
2058 str | None,
2059 Doc(
2060 """
2061 Custom operation ID to be used by this *path operation*.
2063 By default, it is generated automatically.
2065 If you provide a custom operation ID, you need to make sure it is
2066 unique for the whole API.
2068 You can customize the
2069 operation ID generation with the parameter
2070 `generate_unique_id_function` in the `FastAPI` class.
2072 Read more about it in the
2073 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
2074 """
2075 ),
2076 ] = None,
2077 response_model_include: Annotated[
2078 IncEx | None,
2079 Doc(
2080 """
2081 Configuration passed to Pydantic to include only certain fields in the
2082 response data.
2084 Read more about it in the
2085 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
2086 """
2087 ),
2088 ] = None,
2089 response_model_exclude: Annotated[
2090 IncEx | None,
2091 Doc(
2092 """
2093 Configuration passed to Pydantic to exclude certain fields in the
2094 response data.
2096 Read more about it in the
2097 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
2098 """
2099 ),
2100 ] = None,
2101 response_model_by_alias: Annotated[
2102 bool,
2103 Doc(
2104 """
2105 Configuration passed to Pydantic to define if the response model
2106 should be serialized by alias when an alias is used.
2108 Read more about it in the
2109 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
2110 """
2111 ),
2112 ] = True,
2113 response_model_exclude_unset: Annotated[
2114 bool,
2115 Doc(
2116 """
2117 Configuration passed to Pydantic to define if the response data
2118 should have all the fields, including the ones that were not set and
2119 have their default values. This is different from
2120 `response_model_exclude_defaults` in that if the fields are set,
2121 they will be included in the response, even if the value is the same
2122 as the default.
2124 When `True`, default values are omitted from the response.
2126 Read more about it in the
2127 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
2128 """
2129 ),
2130 ] = False,
2131 response_model_exclude_defaults: Annotated[
2132 bool,
2133 Doc(
2134 """
2135 Configuration passed to Pydantic to define if the response data
2136 should have all the fields, including the ones that have the same value
2137 as the default. This is different from `response_model_exclude_unset`
2138 in that if the fields are set but contain the same default values,
2139 they will be excluded from the response.
2141 When `True`, default values are omitted from the response.
2143 Read more about it in the
2144 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
2145 """
2146 ),
2147 ] = False,
2148 response_model_exclude_none: Annotated[
2149 bool,
2150 Doc(
2151 """
2152 Configuration passed to Pydantic to define if the response data should
2153 exclude fields set to `None`.
2155 This is much simpler (less smart) than `response_model_exclude_unset`
2156 and `response_model_exclude_defaults`. You probably want to use one of
2157 those two instead of this one, as those allow returning `None` values
2158 when it makes sense.
2160 Read more about it in the
2161 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_exclude_none).
2162 """
2163 ),
2164 ] = False,
2165 include_in_schema: Annotated[
2166 bool,
2167 Doc(
2168 """
2169 Include this *path operation* in the generated OpenAPI schema.
2171 This affects the generated OpenAPI (e.g. visible at `/docs`).
2173 Read more about it in the
2174 [FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
2175 """
2176 ),
2177 ] = True,
2178 response_class: Annotated[
2179 type[Response],
2180 Doc(
2181 """
2182 Response class to be used for this *path operation*.
2184 This will not be used if you return a response directly.
2186 Read more about it in the
2187 [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/#redirectresponse).
2188 """
2189 ),
2190 ] = Default(JSONResponse),
2191 name: Annotated[
2192 str | None,
2193 Doc(
2194 """
2195 Name for this *path operation*. Only used internally.
2196 """
2197 ),
2198 ] = None,
2199 callbacks: Annotated[
2200 list[BaseRoute] | None,
2201 Doc(
2202 """
2203 List of *path operations* that will be used as OpenAPI callbacks.
2205 This is only for OpenAPI documentation, the callbacks won't be used
2206 directly.
2208 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2210 Read more about it in the
2211 [FastAPI docs for OpenAPI Callbacks](https://fastapi.tiangolo.com/advanced/openapi-callbacks/).
2212 """
2213 ),
2214 ] = None,
2215 openapi_extra: Annotated[
2216 dict[str, Any] | None,
2217 Doc(
2218 """
2219 Extra metadata to be included in the OpenAPI schema for this *path
2220 operation*.
2222 Read more about it in the
2223 [FastAPI docs for Path Operation Advanced Configuration](https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/#custom-openapi-path-operation-schema).
2224 """
2225 ),
2226 ] = None,
2227 generate_unique_id_function: Annotated[
2228 Callable[[routing.APIRoute], str],
2229 Doc(
2230 """
2231 Customize the function used to generate unique IDs for the *path
2232 operations* shown in the generated OpenAPI.
2234 This is particularly useful when automatically generating clients or
2235 SDKs for your API.
2237 Read more about it in the
2238 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
2239 """
2240 ),
2241 ] = Default(generate_unique_id),
2242 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
2243 """
2244 Add a *path operation* using an HTTP PUT operation.
2246 ## Example
2248 ```python
2249 from fastapi import FastAPI
2250 from pydantic import BaseModel
2252 class Item(BaseModel):
2253 name: str
2254 description: str | None = None
2256 app = FastAPI()
2258 @app.put("/items/{item_id}")
2259 def replace_item(item_id: str, item: Item):
2260 return {"message": "Item replaced", "id": item_id}
2261 ```
2262 """
2263 return self.router.put( 1abdc
2264 path,
2265 response_model=response_model,
2266 status_code=status_code,
2267 tags=tags,
2268 dependencies=dependencies,
2269 summary=summary,
2270 description=description,
2271 response_description=response_description,
2272 responses=responses,
2273 deprecated=deprecated,
2274 operation_id=operation_id,
2275 response_model_include=response_model_include,
2276 response_model_exclude=response_model_exclude,
2277 response_model_by_alias=response_model_by_alias,
2278 response_model_exclude_unset=response_model_exclude_unset,
2279 response_model_exclude_defaults=response_model_exclude_defaults,
2280 response_model_exclude_none=response_model_exclude_none,
2281 include_in_schema=include_in_schema,
2282 response_class=response_class,
2283 name=name,
2284 callbacks=callbacks,
2285 openapi_extra=openapi_extra,
2286 generate_unique_id_function=generate_unique_id_function,
2287 )
2289 def post( 2a b 'zd c
2290 self,
2291 path: Annotated[
2292 str,
2293 Doc(
2294 """
2295 The URL path to be used for this *path operation*.
2297 For example, in `http://example.com/items`, the path is `/items`.
2298 """
2299 ),
2300 ],
2301 *,
2302 response_model: Annotated[
2303 Any,
2304 Doc(
2305 """
2306 The type to use for the response.
2308 It could be any valid Pydantic *field* type. So, it doesn't have to
2309 be a Pydantic model, it could be other things, like a `list`, `dict`,
2310 etc.
2312 It will be used for:
2314 * Documentation: the generated OpenAPI (and the UI at `/docs`) will
2315 show it as the response (JSON Schema).
2316 * Serialization: you could return an arbitrary object and the
2317 `response_model` would be used to serialize that object into the
2318 corresponding JSON.
2319 * Filtering: the JSON sent to the client will only contain the data
2320 (fields) defined in the `response_model`. If you returned an object
2321 that contains an attribute `password` but the `response_model` does
2322 not include that field, the JSON sent to the client would not have
2323 that `password`.
2324 * Validation: whatever you return will be serialized with the
2325 `response_model`, converting any data as necessary to generate the
2326 corresponding JSON. But if the data in the object returned is not
2327 valid, that would mean a violation of the contract with the client,
2328 so it's an error from the API developer. So, FastAPI will raise an
2329 error and return a 500 error code (Internal Server Error).
2331 Read more about it in the
2332 [FastAPI docs for Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).
2333 """
2334 ),
2335 ] = Default(None),
2336 status_code: Annotated[
2337 int | None,
2338 Doc(
2339 """
2340 The default status code to be used for the response.
2342 You could override the status code by returning a response directly.
2344 Read more about it in the
2345 [FastAPI docs for Response Status Code](https://fastapi.tiangolo.com/tutorial/response-status-code/).
2346 """
2347 ),
2348 ] = None,
2349 tags: Annotated[
2350 list[str | Enum] | None,
2351 Doc(
2352 """
2353 A list of tags to be applied to the *path operation*.
2355 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2357 Read more about it in the
2358 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/#tags).
2359 """
2360 ),
2361 ] = None,
2362 dependencies: Annotated[
2363 Sequence[Depends] | None,
2364 Doc(
2365 """
2366 A list of dependencies (using `Depends()`) to be applied to the
2367 *path operation*.
2369 Read more about it in the
2370 [FastAPI docs for Dependencies in path operation decorators](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-in-path-operation-decorators/).
2371 """
2372 ),
2373 ] = None,
2374 summary: Annotated[
2375 str | None,
2376 Doc(
2377 """
2378 A summary for the *path operation*.
2380 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2382 Read more about it in the
2383 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
2384 """
2385 ),
2386 ] = None,
2387 description: Annotated[
2388 str | None,
2389 Doc(
2390 """
2391 A description for the *path operation*.
2393 If not provided, it will be extracted automatically from the docstring
2394 of the *path operation function*.
2396 It can contain Markdown.
2398 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2400 Read more about it in the
2401 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
2402 """
2403 ),
2404 ] = None,
2405 response_description: Annotated[
2406 str,
2407 Doc(
2408 """
2409 The description for the default response.
2411 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2412 """
2413 ),
2414 ] = "Successful Response",
2415 responses: Annotated[
2416 dict[int | str, dict[str, Any]] | None,
2417 Doc(
2418 """
2419 Additional responses that could be returned by this *path operation*.
2421 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2422 """
2423 ),
2424 ] = None,
2425 deprecated: Annotated[
2426 bool | None,
2427 Doc(
2428 """
2429 Mark this *path operation* as deprecated.
2431 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2432 """
2433 ),
2434 ] = None,
2435 operation_id: Annotated[
2436 str | None,
2437 Doc(
2438 """
2439 Custom operation ID to be used by this *path operation*.
2441 By default, it is generated automatically.
2443 If you provide a custom operation ID, you need to make sure it is
2444 unique for the whole API.
2446 You can customize the
2447 operation ID generation with the parameter
2448 `generate_unique_id_function` in the `FastAPI` class.
2450 Read more about it in the
2451 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
2452 """
2453 ),
2454 ] = None,
2455 response_model_include: Annotated[
2456 IncEx | None,
2457 Doc(
2458 """
2459 Configuration passed to Pydantic to include only certain fields in the
2460 response data.
2462 Read more about it in the
2463 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
2464 """
2465 ),
2466 ] = None,
2467 response_model_exclude: Annotated[
2468 IncEx | None,
2469 Doc(
2470 """
2471 Configuration passed to Pydantic to exclude certain fields in the
2472 response data.
2474 Read more about it in the
2475 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
2476 """
2477 ),
2478 ] = None,
2479 response_model_by_alias: Annotated[
2480 bool,
2481 Doc(
2482 """
2483 Configuration passed to Pydantic to define if the response model
2484 should be serialized by alias when an alias is used.
2486 Read more about it in the
2487 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
2488 """
2489 ),
2490 ] = True,
2491 response_model_exclude_unset: Annotated[
2492 bool,
2493 Doc(
2494 """
2495 Configuration passed to Pydantic to define if the response data
2496 should have all the fields, including the ones that were not set and
2497 have their default values. This is different from
2498 `response_model_exclude_defaults` in that if the fields are set,
2499 they will be included in the response, even if the value is the same
2500 as the default.
2502 When `True`, default values are omitted from the response.
2504 Read more about it in the
2505 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
2506 """
2507 ),
2508 ] = False,
2509 response_model_exclude_defaults: Annotated[
2510 bool,
2511 Doc(
2512 """
2513 Configuration passed to Pydantic to define if the response data
2514 should have all the fields, including the ones that have the same value
2515 as the default. This is different from `response_model_exclude_unset`
2516 in that if the fields are set but contain the same default values,
2517 they will be excluded from the response.
2519 When `True`, default values are omitted from the response.
2521 Read more about it in the
2522 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
2523 """
2524 ),
2525 ] = False,
2526 response_model_exclude_none: Annotated[
2527 bool,
2528 Doc(
2529 """
2530 Configuration passed to Pydantic to define if the response data should
2531 exclude fields set to `None`.
2533 This is much simpler (less smart) than `response_model_exclude_unset`
2534 and `response_model_exclude_defaults`. You probably want to use one of
2535 those two instead of this one, as those allow returning `None` values
2536 when it makes sense.
2538 Read more about it in the
2539 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_exclude_none).
2540 """
2541 ),
2542 ] = False,
2543 include_in_schema: Annotated[
2544 bool,
2545 Doc(
2546 """
2547 Include this *path operation* in the generated OpenAPI schema.
2549 This affects the generated OpenAPI (e.g. visible at `/docs`).
2551 Read more about it in the
2552 [FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
2553 """
2554 ),
2555 ] = True,
2556 response_class: Annotated[
2557 type[Response],
2558 Doc(
2559 """
2560 Response class to be used for this *path operation*.
2562 This will not be used if you return a response directly.
2564 Read more about it in the
2565 [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/#redirectresponse).
2566 """
2567 ),
2568 ] = Default(JSONResponse),
2569 name: Annotated[
2570 str | None,
2571 Doc(
2572 """
2573 Name for this *path operation*. Only used internally.
2574 """
2575 ),
2576 ] = None,
2577 callbacks: Annotated[
2578 list[BaseRoute] | None,
2579 Doc(
2580 """
2581 List of *path operations* that will be used as OpenAPI callbacks.
2583 This is only for OpenAPI documentation, the callbacks won't be used
2584 directly.
2586 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2588 Read more about it in the
2589 [FastAPI docs for OpenAPI Callbacks](https://fastapi.tiangolo.com/advanced/openapi-callbacks/).
2590 """
2591 ),
2592 ] = None,
2593 openapi_extra: Annotated[
2594 dict[str, Any] | None,
2595 Doc(
2596 """
2597 Extra metadata to be included in the OpenAPI schema for this *path
2598 operation*.
2600 Read more about it in the
2601 [FastAPI docs for Path Operation Advanced Configuration](https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/#custom-openapi-path-operation-schema).
2602 """
2603 ),
2604 ] = None,
2605 generate_unique_id_function: Annotated[
2606 Callable[[routing.APIRoute], str],
2607 Doc(
2608 """
2609 Customize the function used to generate unique IDs for the *path
2610 operations* shown in the generated OpenAPI.
2612 This is particularly useful when automatically generating clients or
2613 SDKs for your API.
2615 Read more about it in the
2616 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
2617 """
2618 ),
2619 ] = Default(generate_unique_id),
2620 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
2621 """
2622 Add a *path operation* using an HTTP POST operation.
2624 ## Example
2626 ```python
2627 from fastapi import FastAPI
2628 from pydantic import BaseModel
2630 class Item(BaseModel):
2631 name: str
2632 description: str | None = None
2634 app = FastAPI()
2636 @app.post("/items/")
2637 def create_item(item: Item):
2638 return {"message": "Item created"}
2639 ```
2640 """
2641 return self.router.post( 2a ` { | h I i j k l m J dbWcXcYcZc0c1c2c3c4c5c6c0 1 2 n o 3 4 8c#c$cebfbK gbhb8 p GbM Hbb NbObPbq N r s t u v O Vb{c|c}c~cadbdcdddedfdgd! # $ w x % ' WbXbP YbZb+ y =bR ?bd c `b{b|bz S A B C D E T dcBdCdDdEdFdGdHdIdJdKdLd- . / F G : ; NdQdRdecfcU gchc[ H GcW Hc
2642 path,
2643 response_model=response_model,
2644 status_code=status_code,
2645 tags=tags,
2646 dependencies=dependencies,
2647 summary=summary,
2648 description=description,
2649 response_description=response_description,
2650 responses=responses,
2651 deprecated=deprecated,
2652 operation_id=operation_id,
2653 response_model_include=response_model_include,
2654 response_model_exclude=response_model_exclude,
2655 response_model_by_alias=response_model_by_alias,
2656 response_model_exclude_unset=response_model_exclude_unset,
2657 response_model_exclude_defaults=response_model_exclude_defaults,
2658 response_model_exclude_none=response_model_exclude_none,
2659 include_in_schema=include_in_schema,
2660 response_class=response_class,
2661 name=name,
2662 callbacks=callbacks,
2663 openapi_extra=openapi_extra,
2664 generate_unique_id_function=generate_unique_id_function,
2665 )
2667 def delete( 2a b 'zd c
2668 self,
2669 path: Annotated[
2670 str,
2671 Doc(
2672 """
2673 The URL path to be used for this *path operation*.
2675 For example, in `http://example.com/items`, the path is `/items`.
2676 """
2677 ),
2678 ],
2679 *,
2680 response_model: Annotated[
2681 Any,
2682 Doc(
2683 """
2684 The type to use for the response.
2686 It could be any valid Pydantic *field* type. So, it doesn't have to
2687 be a Pydantic model, it could be other things, like a `list`, `dict`,
2688 etc.
2690 It will be used for:
2692 * Documentation: the generated OpenAPI (and the UI at `/docs`) will
2693 show it as the response (JSON Schema).
2694 * Serialization: you could return an arbitrary object and the
2695 `response_model` would be used to serialize that object into the
2696 corresponding JSON.
2697 * Filtering: the JSON sent to the client will only contain the data
2698 (fields) defined in the `response_model`. If you returned an object
2699 that contains an attribute `password` but the `response_model` does
2700 not include that field, the JSON sent to the client would not have
2701 that `password`.
2702 * Validation: whatever you return will be serialized with the
2703 `response_model`, converting any data as necessary to generate the
2704 corresponding JSON. But if the data in the object returned is not
2705 valid, that would mean a violation of the contract with the client,
2706 so it's an error from the API developer. So, FastAPI will raise an
2707 error and return a 500 error code (Internal Server Error).
2709 Read more about it in the
2710 [FastAPI docs for Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).
2711 """
2712 ),
2713 ] = Default(None),
2714 status_code: Annotated[
2715 int | None,
2716 Doc(
2717 """
2718 The default status code to be used for the response.
2720 You could override the status code by returning a response directly.
2722 Read more about it in the
2723 [FastAPI docs for Response Status Code](https://fastapi.tiangolo.com/tutorial/response-status-code/).
2724 """
2725 ),
2726 ] = None,
2727 tags: Annotated[
2728 list[str | Enum] | None,
2729 Doc(
2730 """
2731 A list of tags to be applied to the *path operation*.
2733 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2735 Read more about it in the
2736 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/#tags).
2737 """
2738 ),
2739 ] = None,
2740 dependencies: Annotated[
2741 Sequence[Depends] | None,
2742 Doc(
2743 """
2744 A list of dependencies (using `Depends()`) to be applied to the
2745 *path operation*.
2747 Read more about it in the
2748 [FastAPI docs for Dependencies in path operation decorators](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-in-path-operation-decorators/).
2749 """
2750 ),
2751 ] = None,
2752 summary: Annotated[
2753 str | None,
2754 Doc(
2755 """
2756 A summary for the *path operation*.
2758 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2760 Read more about it in the
2761 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
2762 """
2763 ),
2764 ] = None,
2765 description: Annotated[
2766 str | None,
2767 Doc(
2768 """
2769 A description for the *path operation*.
2771 If not provided, it will be extracted automatically from the docstring
2772 of the *path operation function*.
2774 It can contain Markdown.
2776 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2778 Read more about it in the
2779 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
2780 """
2781 ),
2782 ] = None,
2783 response_description: Annotated[
2784 str,
2785 Doc(
2786 """
2787 The description for the default response.
2789 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2790 """
2791 ),
2792 ] = "Successful Response",
2793 responses: Annotated[
2794 dict[int | str, dict[str, Any]] | None,
2795 Doc(
2796 """
2797 Additional responses that could be returned by this *path operation*.
2799 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2800 """
2801 ),
2802 ] = None,
2803 deprecated: Annotated[
2804 bool | None,
2805 Doc(
2806 """
2807 Mark this *path operation* as deprecated.
2809 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2810 """
2811 ),
2812 ] = None,
2813 operation_id: Annotated[
2814 str | None,
2815 Doc(
2816 """
2817 Custom operation ID to be used by this *path operation*.
2819 By default, it is generated automatically.
2821 If you provide a custom operation ID, you need to make sure it is
2822 unique for the whole API.
2824 You can customize the
2825 operation ID generation with the parameter
2826 `generate_unique_id_function` in the `FastAPI` class.
2828 Read more about it in the
2829 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
2830 """
2831 ),
2832 ] = None,
2833 response_model_include: Annotated[
2834 IncEx | None,
2835 Doc(
2836 """
2837 Configuration passed to Pydantic to include only certain fields in the
2838 response data.
2840 Read more about it in the
2841 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
2842 """
2843 ),
2844 ] = None,
2845 response_model_exclude: Annotated[
2846 IncEx | None,
2847 Doc(
2848 """
2849 Configuration passed to Pydantic to exclude certain fields in the
2850 response data.
2852 Read more about it in the
2853 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
2854 """
2855 ),
2856 ] = None,
2857 response_model_by_alias: Annotated[
2858 bool,
2859 Doc(
2860 """
2861 Configuration passed to Pydantic to define if the response model
2862 should be serialized by alias when an alias is used.
2864 Read more about it in the
2865 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
2866 """
2867 ),
2868 ] = True,
2869 response_model_exclude_unset: Annotated[
2870 bool,
2871 Doc(
2872 """
2873 Configuration passed to Pydantic to define if the response data
2874 should have all the fields, including the ones that were not set and
2875 have their default values. This is different from
2876 `response_model_exclude_defaults` in that if the fields are set,
2877 they will be included in the response, even if the value is the same
2878 as the default.
2880 When `True`, default values are omitted from the response.
2882 Read more about it in the
2883 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
2884 """
2885 ),
2886 ] = False,
2887 response_model_exclude_defaults: Annotated[
2888 bool,
2889 Doc(
2890 """
2891 Configuration passed to Pydantic to define if the response data
2892 should have all the fields, including the ones that have the same value
2893 as the default. This is different from `response_model_exclude_unset`
2894 in that if the fields are set but contain the same default values,
2895 they will be excluded from the response.
2897 When `True`, default values are omitted from the response.
2899 Read more about it in the
2900 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
2901 """
2902 ),
2903 ] = False,
2904 response_model_exclude_none: Annotated[
2905 bool,
2906 Doc(
2907 """
2908 Configuration passed to Pydantic to define if the response data should
2909 exclude fields set to `None`.
2911 This is much simpler (less smart) than `response_model_exclude_unset`
2912 and `response_model_exclude_defaults`. You probably want to use one of
2913 those two instead of this one, as those allow returning `None` values
2914 when it makes sense.
2916 Read more about it in the
2917 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_exclude_none).
2918 """
2919 ),
2920 ] = False,
2921 include_in_schema: Annotated[
2922 bool,
2923 Doc(
2924 """
2925 Include this *path operation* in the generated OpenAPI schema.
2927 This affects the generated OpenAPI (e.g. visible at `/docs`).
2929 Read more about it in the
2930 [FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
2931 """
2932 ),
2933 ] = True,
2934 response_class: Annotated[
2935 type[Response],
2936 Doc(
2937 """
2938 Response class to be used for this *path operation*.
2940 This will not be used if you return a response directly.
2942 Read more about it in the
2943 [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/#redirectresponse).
2944 """
2945 ),
2946 ] = Default(JSONResponse),
2947 name: Annotated[
2948 str | None,
2949 Doc(
2950 """
2951 Name for this *path operation*. Only used internally.
2952 """
2953 ),
2954 ] = None,
2955 callbacks: Annotated[
2956 list[BaseRoute] | None,
2957 Doc(
2958 """
2959 List of *path operations* that will be used as OpenAPI callbacks.
2961 This is only for OpenAPI documentation, the callbacks won't be used
2962 directly.
2964 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
2966 Read more about it in the
2967 [FastAPI docs for OpenAPI Callbacks](https://fastapi.tiangolo.com/advanced/openapi-callbacks/).
2968 """
2969 ),
2970 ] = None,
2971 openapi_extra: Annotated[
2972 dict[str, Any] | None,
2973 Doc(
2974 """
2975 Extra metadata to be included in the OpenAPI schema for this *path
2976 operation*.
2978 Read more about it in the
2979 [FastAPI docs for Path Operation Advanced Configuration](https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/#custom-openapi-path-operation-schema).
2980 """
2981 ),
2982 ] = None,
2983 generate_unique_id_function: Annotated[
2984 Callable[[routing.APIRoute], str],
2985 Doc(
2986 """
2987 Customize the function used to generate unique IDs for the *path
2988 operations* shown in the generated OpenAPI.
2990 This is particularly useful when automatically generating clients or
2991 SDKs for your API.
2993 Read more about it in the
2994 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
2995 """
2996 ),
2997 ] = Default(generate_unique_id),
2998 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
2999 """
3000 Add a *path operation* using an HTTP DELETE operation.
3002 ## Example
3004 ```python
3005 from fastapi import FastAPI
3007 app = FastAPI()
3009 @app.delete("/items/{item_id}")
3010 def delete_item(item_id: str):
3011 return {"message": "Item deleted"}
3012 ```
3013 """
3014 return self.router.delete( 1abdc
3015 path,
3016 response_model=response_model,
3017 status_code=status_code,
3018 tags=tags,
3019 dependencies=dependencies,
3020 summary=summary,
3021 description=description,
3022 response_description=response_description,
3023 responses=responses,
3024 deprecated=deprecated,
3025 operation_id=operation_id,
3026 response_model_include=response_model_include,
3027 response_model_exclude=response_model_exclude,
3028 response_model_by_alias=response_model_by_alias,
3029 response_model_exclude_unset=response_model_exclude_unset,
3030 response_model_exclude_defaults=response_model_exclude_defaults,
3031 response_model_exclude_none=response_model_exclude_none,
3032 include_in_schema=include_in_schema,
3033 response_class=response_class,
3034 name=name,
3035 callbacks=callbacks,
3036 openapi_extra=openapi_extra,
3037 generate_unique_id_function=generate_unique_id_function,
3038 )
3040 def options( 2a b 'zd c
3041 self,
3042 path: Annotated[
3043 str,
3044 Doc(
3045 """
3046 The URL path to be used for this *path operation*.
3048 For example, in `http://example.com/items`, the path is `/items`.
3049 """
3050 ),
3051 ],
3052 *,
3053 response_model: Annotated[
3054 Any,
3055 Doc(
3056 """
3057 The type to use for the response.
3059 It could be any valid Pydantic *field* type. So, it doesn't have to
3060 be a Pydantic model, it could be other things, like a `list`, `dict`,
3061 etc.
3063 It will be used for:
3065 * Documentation: the generated OpenAPI (and the UI at `/docs`) will
3066 show it as the response (JSON Schema).
3067 * Serialization: you could return an arbitrary object and the
3068 `response_model` would be used to serialize that object into the
3069 corresponding JSON.
3070 * Filtering: the JSON sent to the client will only contain the data
3071 (fields) defined in the `response_model`. If you returned an object
3072 that contains an attribute `password` but the `response_model` does
3073 not include that field, the JSON sent to the client would not have
3074 that `password`.
3075 * Validation: whatever you return will be serialized with the
3076 `response_model`, converting any data as necessary to generate the
3077 corresponding JSON. But if the data in the object returned is not
3078 valid, that would mean a violation of the contract with the client,
3079 so it's an error from the API developer. So, FastAPI will raise an
3080 error and return a 500 error code (Internal Server Error).
3082 Read more about it in the
3083 [FastAPI docs for Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).
3084 """
3085 ),
3086 ] = Default(None),
3087 status_code: Annotated[
3088 int | None,
3089 Doc(
3090 """
3091 The default status code to be used for the response.
3093 You could override the status code by returning a response directly.
3095 Read more about it in the
3096 [FastAPI docs for Response Status Code](https://fastapi.tiangolo.com/tutorial/response-status-code/).
3097 """
3098 ),
3099 ] = None,
3100 tags: Annotated[
3101 list[str | Enum] | None,
3102 Doc(
3103 """
3104 A list of tags to be applied to the *path operation*.
3106 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3108 Read more about it in the
3109 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/#tags).
3110 """
3111 ),
3112 ] = None,
3113 dependencies: Annotated[
3114 Sequence[Depends] | None,
3115 Doc(
3116 """
3117 A list of dependencies (using `Depends()`) to be applied to the
3118 *path operation*.
3120 Read more about it in the
3121 [FastAPI docs for Dependencies in path operation decorators](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-in-path-operation-decorators/).
3122 """
3123 ),
3124 ] = None,
3125 summary: Annotated[
3126 str | None,
3127 Doc(
3128 """
3129 A summary for the *path operation*.
3131 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3133 Read more about it in the
3134 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
3135 """
3136 ),
3137 ] = None,
3138 description: Annotated[
3139 str | None,
3140 Doc(
3141 """
3142 A description for the *path operation*.
3144 If not provided, it will be extracted automatically from the docstring
3145 of the *path operation function*.
3147 It can contain Markdown.
3149 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3151 Read more about it in the
3152 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
3153 """
3154 ),
3155 ] = None,
3156 response_description: Annotated[
3157 str,
3158 Doc(
3159 """
3160 The description for the default response.
3162 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3163 """
3164 ),
3165 ] = "Successful Response",
3166 responses: Annotated[
3167 dict[int | str, dict[str, Any]] | None,
3168 Doc(
3169 """
3170 Additional responses that could be returned by this *path operation*.
3172 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3173 """
3174 ),
3175 ] = None,
3176 deprecated: Annotated[
3177 bool | None,
3178 Doc(
3179 """
3180 Mark this *path operation* as deprecated.
3182 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3183 """
3184 ),
3185 ] = None,
3186 operation_id: Annotated[
3187 str | None,
3188 Doc(
3189 """
3190 Custom operation ID to be used by this *path operation*.
3192 By default, it is generated automatically.
3194 If you provide a custom operation ID, you need to make sure it is
3195 unique for the whole API.
3197 You can customize the
3198 operation ID generation with the parameter
3199 `generate_unique_id_function` in the `FastAPI` class.
3201 Read more about it in the
3202 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
3203 """
3204 ),
3205 ] = None,
3206 response_model_include: Annotated[
3207 IncEx | None,
3208 Doc(
3209 """
3210 Configuration passed to Pydantic to include only certain fields in the
3211 response data.
3213 Read more about it in the
3214 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
3215 """
3216 ),
3217 ] = None,
3218 response_model_exclude: Annotated[
3219 IncEx | None,
3220 Doc(
3221 """
3222 Configuration passed to Pydantic to exclude certain fields in the
3223 response data.
3225 Read more about it in the
3226 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
3227 """
3228 ),
3229 ] = None,
3230 response_model_by_alias: Annotated[
3231 bool,
3232 Doc(
3233 """
3234 Configuration passed to Pydantic to define if the response model
3235 should be serialized by alias when an alias is used.
3237 Read more about it in the
3238 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
3239 """
3240 ),
3241 ] = True,
3242 response_model_exclude_unset: Annotated[
3243 bool,
3244 Doc(
3245 """
3246 Configuration passed to Pydantic to define if the response data
3247 should have all the fields, including the ones that were not set and
3248 have their default values. This is different from
3249 `response_model_exclude_defaults` in that if the fields are set,
3250 they will be included in the response, even if the value is the same
3251 as the default.
3253 When `True`, default values are omitted from the response.
3255 Read more about it in the
3256 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
3257 """
3258 ),
3259 ] = False,
3260 response_model_exclude_defaults: Annotated[
3261 bool,
3262 Doc(
3263 """
3264 Configuration passed to Pydantic to define if the response data
3265 should have all the fields, including the ones that have the same value
3266 as the default. This is different from `response_model_exclude_unset`
3267 in that if the fields are set but contain the same default values,
3268 they will be excluded from the response.
3270 When `True`, default values are omitted from the response.
3272 Read more about it in the
3273 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
3274 """
3275 ),
3276 ] = False,
3277 response_model_exclude_none: Annotated[
3278 bool,
3279 Doc(
3280 """
3281 Configuration passed to Pydantic to define if the response data should
3282 exclude fields set to `None`.
3284 This is much simpler (less smart) than `response_model_exclude_unset`
3285 and `response_model_exclude_defaults`. You probably want to use one of
3286 those two instead of this one, as those allow returning `None` values
3287 when it makes sense.
3289 Read more about it in the
3290 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_exclude_none).
3291 """
3292 ),
3293 ] = False,
3294 include_in_schema: Annotated[
3295 bool,
3296 Doc(
3297 """
3298 Include this *path operation* in the generated OpenAPI schema.
3300 This affects the generated OpenAPI (e.g. visible at `/docs`).
3302 Read more about it in the
3303 [FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
3304 """
3305 ),
3306 ] = True,
3307 response_class: Annotated[
3308 type[Response],
3309 Doc(
3310 """
3311 Response class to be used for this *path operation*.
3313 This will not be used if you return a response directly.
3315 Read more about it in the
3316 [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/#redirectresponse).
3317 """
3318 ),
3319 ] = Default(JSONResponse),
3320 name: Annotated[
3321 str | None,
3322 Doc(
3323 """
3324 Name for this *path operation*. Only used internally.
3325 """
3326 ),
3327 ] = None,
3328 callbacks: Annotated[
3329 list[BaseRoute] | None,
3330 Doc(
3331 """
3332 List of *path operations* that will be used as OpenAPI callbacks.
3334 This is only for OpenAPI documentation, the callbacks won't be used
3335 directly.
3337 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3339 Read more about it in the
3340 [FastAPI docs for OpenAPI Callbacks](https://fastapi.tiangolo.com/advanced/openapi-callbacks/).
3341 """
3342 ),
3343 ] = None,
3344 openapi_extra: Annotated[
3345 dict[str, Any] | None,
3346 Doc(
3347 """
3348 Extra metadata to be included in the OpenAPI schema for this *path
3349 operation*.
3351 Read more about it in the
3352 [FastAPI docs for Path Operation Advanced Configuration](https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/#custom-openapi-path-operation-schema).
3353 """
3354 ),
3355 ] = None,
3356 generate_unique_id_function: Annotated[
3357 Callable[[routing.APIRoute], str],
3358 Doc(
3359 """
3360 Customize the function used to generate unique IDs for the *path
3361 operations* shown in the generated OpenAPI.
3363 This is particularly useful when automatically generating clients or
3364 SDKs for your API.
3366 Read more about it in the
3367 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
3368 """
3369 ),
3370 ] = Default(generate_unique_id),
3371 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
3372 """
3373 Add a *path operation* using an HTTP OPTIONS operation.
3375 ## Example
3377 ```python
3378 from fastapi import FastAPI
3380 app = FastAPI()
3382 @app.options("/items/")
3383 def get_item_options():
3384 return {"additions": ["Aji", "Guacamole"]}
3385 ```
3386 """
3387 return self.router.options( 1abdc
3388 path,
3389 response_model=response_model,
3390 status_code=status_code,
3391 tags=tags,
3392 dependencies=dependencies,
3393 summary=summary,
3394 description=description,
3395 response_description=response_description,
3396 responses=responses,
3397 deprecated=deprecated,
3398 operation_id=operation_id,
3399 response_model_include=response_model_include,
3400 response_model_exclude=response_model_exclude,
3401 response_model_by_alias=response_model_by_alias,
3402 response_model_exclude_unset=response_model_exclude_unset,
3403 response_model_exclude_defaults=response_model_exclude_defaults,
3404 response_model_exclude_none=response_model_exclude_none,
3405 include_in_schema=include_in_schema,
3406 response_class=response_class,
3407 name=name,
3408 callbacks=callbacks,
3409 openapi_extra=openapi_extra,
3410 generate_unique_id_function=generate_unique_id_function,
3411 )
3413 def head( 2a b 'zd c
3414 self,
3415 path: Annotated[
3416 str,
3417 Doc(
3418 """
3419 The URL path to be used for this *path operation*.
3421 For example, in `http://example.com/items`, the path is `/items`.
3422 """
3423 ),
3424 ],
3425 *,
3426 response_model: Annotated[
3427 Any,
3428 Doc(
3429 """
3430 The type to use for the response.
3432 It could be any valid Pydantic *field* type. So, it doesn't have to
3433 be a Pydantic model, it could be other things, like a `list`, `dict`,
3434 etc.
3436 It will be used for:
3438 * Documentation: the generated OpenAPI (and the UI at `/docs`) will
3439 show it as the response (JSON Schema).
3440 * Serialization: you could return an arbitrary object and the
3441 `response_model` would be used to serialize that object into the
3442 corresponding JSON.
3443 * Filtering: the JSON sent to the client will only contain the data
3444 (fields) defined in the `response_model`. If you returned an object
3445 that contains an attribute `password` but the `response_model` does
3446 not include that field, the JSON sent to the client would not have
3447 that `password`.
3448 * Validation: whatever you return will be serialized with the
3449 `response_model`, converting any data as necessary to generate the
3450 corresponding JSON. But if the data in the object returned is not
3451 valid, that would mean a violation of the contract with the client,
3452 so it's an error from the API developer. So, FastAPI will raise an
3453 error and return a 500 error code (Internal Server Error).
3455 Read more about it in the
3456 [FastAPI docs for Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).
3457 """
3458 ),
3459 ] = Default(None),
3460 status_code: Annotated[
3461 int | None,
3462 Doc(
3463 """
3464 The default status code to be used for the response.
3466 You could override the status code by returning a response directly.
3468 Read more about it in the
3469 [FastAPI docs for Response Status Code](https://fastapi.tiangolo.com/tutorial/response-status-code/).
3470 """
3471 ),
3472 ] = None,
3473 tags: Annotated[
3474 list[str | Enum] | None,
3475 Doc(
3476 """
3477 A list of tags to be applied to the *path operation*.
3479 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3481 Read more about it in the
3482 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/#tags).
3483 """
3484 ),
3485 ] = None,
3486 dependencies: Annotated[
3487 Sequence[Depends] | None,
3488 Doc(
3489 """
3490 A list of dependencies (using `Depends()`) to be applied to the
3491 *path operation*.
3493 Read more about it in the
3494 [FastAPI docs for Dependencies in path operation decorators](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-in-path-operation-decorators/).
3495 """
3496 ),
3497 ] = None,
3498 summary: Annotated[
3499 str | None,
3500 Doc(
3501 """
3502 A summary for the *path operation*.
3504 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3506 Read more about it in the
3507 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
3508 """
3509 ),
3510 ] = None,
3511 description: Annotated[
3512 str | None,
3513 Doc(
3514 """
3515 A description for the *path operation*.
3517 If not provided, it will be extracted automatically from the docstring
3518 of the *path operation function*.
3520 It can contain Markdown.
3522 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3524 Read more about it in the
3525 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
3526 """
3527 ),
3528 ] = None,
3529 response_description: Annotated[
3530 str,
3531 Doc(
3532 """
3533 The description for the default response.
3535 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3536 """
3537 ),
3538 ] = "Successful Response",
3539 responses: Annotated[
3540 dict[int | str, dict[str, Any]] | None,
3541 Doc(
3542 """
3543 Additional responses that could be returned by this *path operation*.
3545 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3546 """
3547 ),
3548 ] = None,
3549 deprecated: Annotated[
3550 bool | None,
3551 Doc(
3552 """
3553 Mark this *path operation* as deprecated.
3555 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3556 """
3557 ),
3558 ] = None,
3559 operation_id: Annotated[
3560 str | None,
3561 Doc(
3562 """
3563 Custom operation ID to be used by this *path operation*.
3565 By default, it is generated automatically.
3567 If you provide a custom operation ID, you need to make sure it is
3568 unique for the whole API.
3570 You can customize the
3571 operation ID generation with the parameter
3572 `generate_unique_id_function` in the `FastAPI` class.
3574 Read more about it in the
3575 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
3576 """
3577 ),
3578 ] = None,
3579 response_model_include: Annotated[
3580 IncEx | None,
3581 Doc(
3582 """
3583 Configuration passed to Pydantic to include only certain fields in the
3584 response data.
3586 Read more about it in the
3587 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
3588 """
3589 ),
3590 ] = None,
3591 response_model_exclude: Annotated[
3592 IncEx | None,
3593 Doc(
3594 """
3595 Configuration passed to Pydantic to exclude certain fields in the
3596 response data.
3598 Read more about it in the
3599 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
3600 """
3601 ),
3602 ] = None,
3603 response_model_by_alias: Annotated[
3604 bool,
3605 Doc(
3606 """
3607 Configuration passed to Pydantic to define if the response model
3608 should be serialized by alias when an alias is used.
3610 Read more about it in the
3611 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
3612 """
3613 ),
3614 ] = True,
3615 response_model_exclude_unset: Annotated[
3616 bool,
3617 Doc(
3618 """
3619 Configuration passed to Pydantic to define if the response data
3620 should have all the fields, including the ones that were not set and
3621 have their default values. This is different from
3622 `response_model_exclude_defaults` in that if the fields are set,
3623 they will be included in the response, even if the value is the same
3624 as the default.
3626 When `True`, default values are omitted from the response.
3628 Read more about it in the
3629 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
3630 """
3631 ),
3632 ] = False,
3633 response_model_exclude_defaults: Annotated[
3634 bool,
3635 Doc(
3636 """
3637 Configuration passed to Pydantic to define if the response data
3638 should have all the fields, including the ones that have the same value
3639 as the default. This is different from `response_model_exclude_unset`
3640 in that if the fields are set but contain the same default values,
3641 they will be excluded from the response.
3643 When `True`, default values are omitted from the response.
3645 Read more about it in the
3646 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
3647 """
3648 ),
3649 ] = False,
3650 response_model_exclude_none: Annotated[
3651 bool,
3652 Doc(
3653 """
3654 Configuration passed to Pydantic to define if the response data should
3655 exclude fields set to `None`.
3657 This is much simpler (less smart) than `response_model_exclude_unset`
3658 and `response_model_exclude_defaults`. You probably want to use one of
3659 those two instead of this one, as those allow returning `None` values
3660 when it makes sense.
3662 Read more about it in the
3663 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_exclude_none).
3664 """
3665 ),
3666 ] = False,
3667 include_in_schema: Annotated[
3668 bool,
3669 Doc(
3670 """
3671 Include this *path operation* in the generated OpenAPI schema.
3673 This affects the generated OpenAPI (e.g. visible at `/docs`).
3675 Read more about it in the
3676 [FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
3677 """
3678 ),
3679 ] = True,
3680 response_class: Annotated[
3681 type[Response],
3682 Doc(
3683 """
3684 Response class to be used for this *path operation*.
3686 This will not be used if you return a response directly.
3688 Read more about it in the
3689 [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/#redirectresponse).
3690 """
3691 ),
3692 ] = Default(JSONResponse),
3693 name: Annotated[
3694 str | None,
3695 Doc(
3696 """
3697 Name for this *path operation*. Only used internally.
3698 """
3699 ),
3700 ] = None,
3701 callbacks: Annotated[
3702 list[BaseRoute] | None,
3703 Doc(
3704 """
3705 List of *path operations* that will be used as OpenAPI callbacks.
3707 This is only for OpenAPI documentation, the callbacks won't be used
3708 directly.
3710 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3712 Read more about it in the
3713 [FastAPI docs for OpenAPI Callbacks](https://fastapi.tiangolo.com/advanced/openapi-callbacks/).
3714 """
3715 ),
3716 ] = None,
3717 openapi_extra: Annotated[
3718 dict[str, Any] | None,
3719 Doc(
3720 """
3721 Extra metadata to be included in the OpenAPI schema for this *path
3722 operation*.
3724 Read more about it in the
3725 [FastAPI docs for Path Operation Advanced Configuration](https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/#custom-openapi-path-operation-schema).
3726 """
3727 ),
3728 ] = None,
3729 generate_unique_id_function: Annotated[
3730 Callable[[routing.APIRoute], str],
3731 Doc(
3732 """
3733 Customize the function used to generate unique IDs for the *path
3734 operations* shown in the generated OpenAPI.
3736 This is particularly useful when automatically generating clients or
3737 SDKs for your API.
3739 Read more about it in the
3740 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
3741 """
3742 ),
3743 ] = Default(generate_unique_id),
3744 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
3745 """
3746 Add a *path operation* using an HTTP HEAD operation.
3748 ## Example
3750 ```python
3751 from fastapi import FastAPI, Response
3753 app = FastAPI()
3755 @app.head("/items/", status_code=204)
3756 def get_items_headers(response: Response):
3757 response.headers["X-Cat-Dog"] = "Alone in the world"
3758 ```
3759 """
3760 return self.router.head( 1abdc
3761 path,
3762 response_model=response_model,
3763 status_code=status_code,
3764 tags=tags,
3765 dependencies=dependencies,
3766 summary=summary,
3767 description=description,
3768 response_description=response_description,
3769 responses=responses,
3770 deprecated=deprecated,
3771 operation_id=operation_id,
3772 response_model_include=response_model_include,
3773 response_model_exclude=response_model_exclude,
3774 response_model_by_alias=response_model_by_alias,
3775 response_model_exclude_unset=response_model_exclude_unset,
3776 response_model_exclude_defaults=response_model_exclude_defaults,
3777 response_model_exclude_none=response_model_exclude_none,
3778 include_in_schema=include_in_schema,
3779 response_class=response_class,
3780 name=name,
3781 callbacks=callbacks,
3782 openapi_extra=openapi_extra,
3783 generate_unique_id_function=generate_unique_id_function,
3784 )
3786 def patch( 2a b 'zd c
3787 self,
3788 path: Annotated[
3789 str,
3790 Doc(
3791 """
3792 The URL path to be used for this *path operation*.
3794 For example, in `http://example.com/items`, the path is `/items`.
3795 """
3796 ),
3797 ],
3798 *,
3799 response_model: Annotated[
3800 Any,
3801 Doc(
3802 """
3803 The type to use for the response.
3805 It could be any valid Pydantic *field* type. So, it doesn't have to
3806 be a Pydantic model, it could be other things, like a `list`, `dict`,
3807 etc.
3809 It will be used for:
3811 * Documentation: the generated OpenAPI (and the UI at `/docs`) will
3812 show it as the response (JSON Schema).
3813 * Serialization: you could return an arbitrary object and the
3814 `response_model` would be used to serialize that object into the
3815 corresponding JSON.
3816 * Filtering: the JSON sent to the client will only contain the data
3817 (fields) defined in the `response_model`. If you returned an object
3818 that contains an attribute `password` but the `response_model` does
3819 not include that field, the JSON sent to the client would not have
3820 that `password`.
3821 * Validation: whatever you return will be serialized with the
3822 `response_model`, converting any data as necessary to generate the
3823 corresponding JSON. But if the data in the object returned is not
3824 valid, that would mean a violation of the contract with the client,
3825 so it's an error from the API developer. So, FastAPI will raise an
3826 error and return a 500 error code (Internal Server Error).
3828 Read more about it in the
3829 [FastAPI docs for Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).
3830 """
3831 ),
3832 ] = Default(None),
3833 status_code: Annotated[
3834 int | None,
3835 Doc(
3836 """
3837 The default status code to be used for the response.
3839 You could override the status code by returning a response directly.
3841 Read more about it in the
3842 [FastAPI docs for Response Status Code](https://fastapi.tiangolo.com/tutorial/response-status-code/).
3843 """
3844 ),
3845 ] = None,
3846 tags: Annotated[
3847 list[str | Enum] | None,
3848 Doc(
3849 """
3850 A list of tags to be applied to the *path operation*.
3852 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3854 Read more about it in the
3855 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/#tags).
3856 """
3857 ),
3858 ] = None,
3859 dependencies: Annotated[
3860 Sequence[Depends] | None,
3861 Doc(
3862 """
3863 A list of dependencies (using `Depends()`) to be applied to the
3864 *path operation*.
3866 Read more about it in the
3867 [FastAPI docs for Dependencies in path operation decorators](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-in-path-operation-decorators/).
3868 """
3869 ),
3870 ] = None,
3871 summary: Annotated[
3872 str | None,
3873 Doc(
3874 """
3875 A summary for the *path operation*.
3877 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3879 Read more about it in the
3880 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
3881 """
3882 ),
3883 ] = None,
3884 description: Annotated[
3885 str | None,
3886 Doc(
3887 """
3888 A description for the *path operation*.
3890 If not provided, it will be extracted automatically from the docstring
3891 of the *path operation function*.
3893 It can contain Markdown.
3895 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3897 Read more about it in the
3898 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
3899 """
3900 ),
3901 ] = None,
3902 response_description: Annotated[
3903 str,
3904 Doc(
3905 """
3906 The description for the default response.
3908 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3909 """
3910 ),
3911 ] = "Successful Response",
3912 responses: Annotated[
3913 dict[int | str, dict[str, Any]] | None,
3914 Doc(
3915 """
3916 Additional responses that could be returned by this *path operation*.
3918 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3919 """
3920 ),
3921 ] = None,
3922 deprecated: Annotated[
3923 bool | None,
3924 Doc(
3925 """
3926 Mark this *path operation* as deprecated.
3928 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
3929 """
3930 ),
3931 ] = None,
3932 operation_id: Annotated[
3933 str | None,
3934 Doc(
3935 """
3936 Custom operation ID to be used by this *path operation*.
3938 By default, it is generated automatically.
3940 If you provide a custom operation ID, you need to make sure it is
3941 unique for the whole API.
3943 You can customize the
3944 operation ID generation with the parameter
3945 `generate_unique_id_function` in the `FastAPI` class.
3947 Read more about it in the
3948 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
3949 """
3950 ),
3951 ] = None,
3952 response_model_include: Annotated[
3953 IncEx | None,
3954 Doc(
3955 """
3956 Configuration passed to Pydantic to include only certain fields in the
3957 response data.
3959 Read more about it in the
3960 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
3961 """
3962 ),
3963 ] = None,
3964 response_model_exclude: Annotated[
3965 IncEx | None,
3966 Doc(
3967 """
3968 Configuration passed to Pydantic to exclude certain fields in the
3969 response data.
3971 Read more about it in the
3972 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
3973 """
3974 ),
3975 ] = None,
3976 response_model_by_alias: Annotated[
3977 bool,
3978 Doc(
3979 """
3980 Configuration passed to Pydantic to define if the response model
3981 should be serialized by alias when an alias is used.
3983 Read more about it in the
3984 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
3985 """
3986 ),
3987 ] = True,
3988 response_model_exclude_unset: Annotated[
3989 bool,
3990 Doc(
3991 """
3992 Configuration passed to Pydantic to define if the response data
3993 should have all the fields, including the ones that were not set and
3994 have their default values. This is different from
3995 `response_model_exclude_defaults` in that if the fields are set,
3996 they will be included in the response, even if the value is the same
3997 as the default.
3999 When `True`, default values are omitted from the response.
4001 Read more about it in the
4002 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
4003 """
4004 ),
4005 ] = False,
4006 response_model_exclude_defaults: Annotated[
4007 bool,
4008 Doc(
4009 """
4010 Configuration passed to Pydantic to define if the response data
4011 should have all the fields, including the ones that have the same value
4012 as the default. This is different from `response_model_exclude_unset`
4013 in that if the fields are set but contain the same default values,
4014 they will be excluded from the response.
4016 When `True`, default values are omitted from the response.
4018 Read more about it in the
4019 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
4020 """
4021 ),
4022 ] = False,
4023 response_model_exclude_none: Annotated[
4024 bool,
4025 Doc(
4026 """
4027 Configuration passed to Pydantic to define if the response data should
4028 exclude fields set to `None`.
4030 This is much simpler (less smart) than `response_model_exclude_unset`
4031 and `response_model_exclude_defaults`. You probably want to use one of
4032 those two instead of this one, as those allow returning `None` values
4033 when it makes sense.
4035 Read more about it in the
4036 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_exclude_none).
4037 """
4038 ),
4039 ] = False,
4040 include_in_schema: Annotated[
4041 bool,
4042 Doc(
4043 """
4044 Include this *path operation* in the generated OpenAPI schema.
4046 This affects the generated OpenAPI (e.g. visible at `/docs`).
4048 Read more about it in the
4049 [FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
4050 """
4051 ),
4052 ] = True,
4053 response_class: Annotated[
4054 type[Response],
4055 Doc(
4056 """
4057 Response class to be used for this *path operation*.
4059 This will not be used if you return a response directly.
4061 Read more about it in the
4062 [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/#redirectresponse).
4063 """
4064 ),
4065 ] = Default(JSONResponse),
4066 name: Annotated[
4067 str | None,
4068 Doc(
4069 """
4070 Name for this *path operation*. Only used internally.
4071 """
4072 ),
4073 ] = None,
4074 callbacks: Annotated[
4075 list[BaseRoute] | None,
4076 Doc(
4077 """
4078 List of *path operations* that will be used as OpenAPI callbacks.
4080 This is only for OpenAPI documentation, the callbacks won't be used
4081 directly.
4083 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
4085 Read more about it in the
4086 [FastAPI docs for OpenAPI Callbacks](https://fastapi.tiangolo.com/advanced/openapi-callbacks/).
4087 """
4088 ),
4089 ] = None,
4090 openapi_extra: Annotated[
4091 dict[str, Any] | None,
4092 Doc(
4093 """
4094 Extra metadata to be included in the OpenAPI schema for this *path
4095 operation*.
4097 Read more about it in the
4098 [FastAPI docs for Path Operation Advanced Configuration](https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/#custom-openapi-path-operation-schema).
4099 """
4100 ),
4101 ] = None,
4102 generate_unique_id_function: Annotated[
4103 Callable[[routing.APIRoute], str],
4104 Doc(
4105 """
4106 Customize the function used to generate unique IDs for the *path
4107 operations* shown in the generated OpenAPI.
4109 This is particularly useful when automatically generating clients or
4110 SDKs for your API.
4112 Read more about it in the
4113 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
4114 """
4115 ),
4116 ] = Default(generate_unique_id),
4117 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
4118 """
4119 Add a *path operation* using an HTTP PATCH operation.
4121 ## Example
4123 ```python
4124 from fastapi import FastAPI
4125 from pydantic import BaseModel
4127 class Item(BaseModel):
4128 name: str
4129 description: str | None = None
4131 app = FastAPI()
4133 @app.patch("/items/")
4134 def update_item(item: Item):
4135 return {"message": "Item updated in place"}
4136 ```
4137 """
4138 return self.router.patch( 1abdc
4139 path,
4140 response_model=response_model,
4141 status_code=status_code,
4142 tags=tags,
4143 dependencies=dependencies,
4144 summary=summary,
4145 description=description,
4146 response_description=response_description,
4147 responses=responses,
4148 deprecated=deprecated,
4149 operation_id=operation_id,
4150 response_model_include=response_model_include,
4151 response_model_exclude=response_model_exclude,
4152 response_model_by_alias=response_model_by_alias,
4153 response_model_exclude_unset=response_model_exclude_unset,
4154 response_model_exclude_defaults=response_model_exclude_defaults,
4155 response_model_exclude_none=response_model_exclude_none,
4156 include_in_schema=include_in_schema,
4157 response_class=response_class,
4158 name=name,
4159 callbacks=callbacks,
4160 openapi_extra=openapi_extra,
4161 generate_unique_id_function=generate_unique_id_function,
4162 )
4164 def trace( 2a b 'zd c
4165 self,
4166 path: Annotated[
4167 str,
4168 Doc(
4169 """
4170 The URL path to be used for this *path operation*.
4172 For example, in `http://example.com/items`, the path is `/items`.
4173 """
4174 ),
4175 ],
4176 *,
4177 response_model: Annotated[
4178 Any,
4179 Doc(
4180 """
4181 The type to use for the response.
4183 It could be any valid Pydantic *field* type. So, it doesn't have to
4184 be a Pydantic model, it could be other things, like a `list`, `dict`,
4185 etc.
4187 It will be used for:
4189 * Documentation: the generated OpenAPI (and the UI at `/docs`) will
4190 show it as the response (JSON Schema).
4191 * Serialization: you could return an arbitrary object and the
4192 `response_model` would be used to serialize that object into the
4193 corresponding JSON.
4194 * Filtering: the JSON sent to the client will only contain the data
4195 (fields) defined in the `response_model`. If you returned an object
4196 that contains an attribute `password` but the `response_model` does
4197 not include that field, the JSON sent to the client would not have
4198 that `password`.
4199 * Validation: whatever you return will be serialized with the
4200 `response_model`, converting any data as necessary to generate the
4201 corresponding JSON. But if the data in the object returned is not
4202 valid, that would mean a violation of the contract with the client,
4203 so it's an error from the API developer. So, FastAPI will raise an
4204 error and return a 500 error code (Internal Server Error).
4206 Read more about it in the
4207 [FastAPI docs for Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).
4208 """
4209 ),
4210 ] = Default(None),
4211 status_code: Annotated[
4212 int | None,
4213 Doc(
4214 """
4215 The default status code to be used for the response.
4217 You could override the status code by returning a response directly.
4219 Read more about it in the
4220 [FastAPI docs for Response Status Code](https://fastapi.tiangolo.com/tutorial/response-status-code/).
4221 """
4222 ),
4223 ] = None,
4224 tags: Annotated[
4225 list[str | Enum] | None,
4226 Doc(
4227 """
4228 A list of tags to be applied to the *path operation*.
4230 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
4232 Read more about it in the
4233 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/#tags).
4234 """
4235 ),
4236 ] = None,
4237 dependencies: Annotated[
4238 Sequence[Depends] | None,
4239 Doc(
4240 """
4241 A list of dependencies (using `Depends()`) to be applied to the
4242 *path operation*.
4244 Read more about it in the
4245 [FastAPI docs for Dependencies in path operation decorators](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-in-path-operation-decorators/).
4246 """
4247 ),
4248 ] = None,
4249 summary: Annotated[
4250 str | None,
4251 Doc(
4252 """
4253 A summary for the *path operation*.
4255 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
4257 Read more about it in the
4258 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
4259 """
4260 ),
4261 ] = None,
4262 description: Annotated[
4263 str | None,
4264 Doc(
4265 """
4266 A description for the *path operation*.
4268 If not provided, it will be extracted automatically from the docstring
4269 of the *path operation function*.
4271 It can contain Markdown.
4273 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
4275 Read more about it in the
4276 [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
4277 """
4278 ),
4279 ] = None,
4280 response_description: Annotated[
4281 str,
4282 Doc(
4283 """
4284 The description for the default response.
4286 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
4287 """
4288 ),
4289 ] = "Successful Response",
4290 responses: Annotated[
4291 dict[int | str, dict[str, Any]] | None,
4292 Doc(
4293 """
4294 Additional responses that could be returned by this *path operation*.
4296 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
4297 """
4298 ),
4299 ] = None,
4300 deprecated: Annotated[
4301 bool | None,
4302 Doc(
4303 """
4304 Mark this *path operation* as deprecated.
4306 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
4307 """
4308 ),
4309 ] = None,
4310 operation_id: Annotated[
4311 str | None,
4312 Doc(
4313 """
4314 Custom operation ID to be used by this *path operation*.
4316 By default, it is generated automatically.
4318 If you provide a custom operation ID, you need to make sure it is
4319 unique for the whole API.
4321 You can customize the
4322 operation ID generation with the parameter
4323 `generate_unique_id_function` in the `FastAPI` class.
4325 Read more about it in the
4326 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
4327 """
4328 ),
4329 ] = None,
4330 response_model_include: Annotated[
4331 IncEx | None,
4332 Doc(
4333 """
4334 Configuration passed to Pydantic to include only certain fields in the
4335 response data.
4337 Read more about it in the
4338 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
4339 """
4340 ),
4341 ] = None,
4342 response_model_exclude: Annotated[
4343 IncEx | None,
4344 Doc(
4345 """
4346 Configuration passed to Pydantic to exclude certain fields in the
4347 response data.
4349 Read more about it in the
4350 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
4351 """
4352 ),
4353 ] = None,
4354 response_model_by_alias: Annotated[
4355 bool,
4356 Doc(
4357 """
4358 Configuration passed to Pydantic to define if the response model
4359 should be serialized by alias when an alias is used.
4361 Read more about it in the
4362 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
4363 """
4364 ),
4365 ] = True,
4366 response_model_exclude_unset: Annotated[
4367 bool,
4368 Doc(
4369 """
4370 Configuration passed to Pydantic to define if the response data
4371 should have all the fields, including the ones that were not set and
4372 have their default values. This is different from
4373 `response_model_exclude_defaults` in that if the fields are set,
4374 they will be included in the response, even if the value is the same
4375 as the default.
4377 When `True`, default values are omitted from the response.
4379 Read more about it in the
4380 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
4381 """
4382 ),
4383 ] = False,
4384 response_model_exclude_defaults: Annotated[
4385 bool,
4386 Doc(
4387 """
4388 Configuration passed to Pydantic to define if the response data
4389 should have all the fields, including the ones that have the same value
4390 as the default. This is different from `response_model_exclude_unset`
4391 in that if the fields are set but contain the same default values,
4392 they will be excluded from the response.
4394 When `True`, default values are omitted from the response.
4396 Read more about it in the
4397 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
4398 """
4399 ),
4400 ] = False,
4401 response_model_exclude_none: Annotated[
4402 bool,
4403 Doc(
4404 """
4405 Configuration passed to Pydantic to define if the response data should
4406 exclude fields set to `None`.
4408 This is much simpler (less smart) than `response_model_exclude_unset`
4409 and `response_model_exclude_defaults`. You probably want to use one of
4410 those two instead of this one, as those allow returning `None` values
4411 when it makes sense.
4413 Read more about it in the
4414 [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_exclude_none).
4415 """
4416 ),
4417 ] = False,
4418 include_in_schema: Annotated[
4419 bool,
4420 Doc(
4421 """
4422 Include this *path operation* in the generated OpenAPI schema.
4424 This affects the generated OpenAPI (e.g. visible at `/docs`).
4426 Read more about it in the
4427 [FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
4428 """
4429 ),
4430 ] = True,
4431 response_class: Annotated[
4432 type[Response],
4433 Doc(
4434 """
4435 Response class to be used for this *path operation*.
4437 This will not be used if you return a response directly.
4439 Read more about it in the
4440 [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/#redirectresponse).
4441 """
4442 ),
4443 ] = Default(JSONResponse),
4444 name: Annotated[
4445 str | None,
4446 Doc(
4447 """
4448 Name for this *path operation*. Only used internally.
4449 """
4450 ),
4451 ] = None,
4452 callbacks: Annotated[
4453 list[BaseRoute] | None,
4454 Doc(
4455 """
4456 List of *path operations* that will be used as OpenAPI callbacks.
4458 This is only for OpenAPI documentation, the callbacks won't be used
4459 directly.
4461 It will be added to the generated OpenAPI (e.g. visible at `/docs`).
4463 Read more about it in the
4464 [FastAPI docs for OpenAPI Callbacks](https://fastapi.tiangolo.com/advanced/openapi-callbacks/).
4465 """
4466 ),
4467 ] = None,
4468 openapi_extra: Annotated[
4469 dict[str, Any] | None,
4470 Doc(
4471 """
4472 Extra metadata to be included in the OpenAPI schema for this *path
4473 operation*.
4475 Read more about it in the
4476 [FastAPI docs for Path Operation Advanced Configuration](https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/#custom-openapi-path-operation-schema).
4477 """
4478 ),
4479 ] = None,
4480 generate_unique_id_function: Annotated[
4481 Callable[[routing.APIRoute], str],
4482 Doc(
4483 """
4484 Customize the function used to generate unique IDs for the *path
4485 operations* shown in the generated OpenAPI.
4487 This is particularly useful when automatically generating clients or
4488 SDKs for your API.
4490 Read more about it in the
4491 [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
4492 """
4493 ),
4494 ] = Default(generate_unique_id),
4495 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
4496 """
4497 Add a *path operation* using an HTTP TRACE operation.
4499 ## Example
4501 ```python
4502 from fastapi import FastAPI
4504 app = FastAPI()
4506 @app.trace("/items/{item_id}")
4507 def trace_item(item_id: str):
4508 return None
4509 ```
4510 """
4511 return self.router.trace( 1abdc
4512 path,
4513 response_model=response_model,
4514 status_code=status_code,
4515 tags=tags,
4516 dependencies=dependencies,
4517 summary=summary,
4518 description=description,
4519 response_description=response_description,
4520 responses=responses,
4521 deprecated=deprecated,
4522 operation_id=operation_id,
4523 response_model_include=response_model_include,
4524 response_model_exclude=response_model_exclude,
4525 response_model_by_alias=response_model_by_alias,
4526 response_model_exclude_unset=response_model_exclude_unset,
4527 response_model_exclude_defaults=response_model_exclude_defaults,
4528 response_model_exclude_none=response_model_exclude_none,
4529 include_in_schema=include_in_schema,
4530 response_class=response_class,
4531 name=name,
4532 callbacks=callbacks,
4533 openapi_extra=openapi_extra,
4534 generate_unique_id_function=generate_unique_id_function,
4535 )
4537 def websocket_route( 1abdc
4538 self, path: str, name: str | None = None
4539 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
4540 def decorator(func: DecoratedCallable) -> DecoratedCallable: 1abdc
4541 self.router.add_websocket_route(path, func, name=name) 1abdc
4542 return func 1abdc
4544 return decorator 1abdc
4546 @deprecated( 1abdc
4547 """
4548 on_event is deprecated, use lifespan event handlers instead.
4550 Read more about it in the
4551 [FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/).
4552 """
4553 )
4554 def on_event( 1abdc
4555 self,
4556 event_type: Annotated[
4557 str,
4558 Doc(
4559 """
4560 The type of event. `startup` or `shutdown`.
4561 """
4562 ),
4563 ],
4564 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
4565 """
4566 Add an event handler for the application.
4568 `on_event` is deprecated, use `lifespan` event handlers instead.
4570 Read more about it in the
4571 [FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/#alternative-events-deprecated).
4572 """
4573 return self.router.on_event(event_type) 1a5X9b(Y,c=Z]
4575 def middleware( 1abdc
4576 self,
4577 middleware_type: Annotated[
4578 str,
4579 Doc(
4580 """
4581 The type of middleware. Currently only supports `http`.
4582 """
4583 ),
4584 ],
4585 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
4586 """
4587 Add a middleware to the application.
4589 Read more about it in the
4590 [FastAPI docs for Middleware](https://fastapi.tiangolo.com/tutorial/middleware/).
4592 ## Example
4594 ```python
4595 import time
4596 from typing import Awaitable, Callable
4598 from fastapi import FastAPI, Request, Response
4600 app = FastAPI()
4603 @app.middleware("http")
4604 async def add_process_time_header(
4605 request: Request, call_next: Callable[[Request], Awaitable[Response]]
4606 ) -> Response:
4607 start_time = time.time()
4608 response = await call_next(request)
4609 process_time = time.time() - start_time
4610 response.headers["X-Process-Time"] = str(process_time)
4611 return response
4612 ```
4613 """
4615 def decorator(func: DecoratedCallable) -> DecoratedCallable: 1abdc
4616 self.add_middleware(BaseHTTPMiddleware, dispatch=func) 1abdc
4617 return func 1abdc
4619 return decorator 1abdc
4621 def exception_handler( 1abdc
4622 self,
4623 exc_class_or_status_code: Annotated[
4624 int | type[Exception],
4625 Doc(
4626 """
4627 The Exception class this would handle, or a status code.
4628 """
4629 ),
4630 ],
4631 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
4632 """
4633 Add an exception handler to the app.
4635 Read more about it in the
4636 [FastAPI docs for Handling Errors](https://fastapi.tiangolo.com/tutorial/handling-errors/).
4638 ## Example
4640 ```python
4641 from fastapi import FastAPI, Request
4642 from fastapi.responses import JSONResponse
4645 class UnicornException(Exception):
4646 def __init__(self, name: str):
4647 self.name = name
4650 app = FastAPI()
4653 @app.exception_handler(UnicornException)
4654 async def unicorn_exception_handler(request: Request, exc: UnicornException):
4655 return JSONResponse(
4656 status_code=418,
4657 content={"message": f"Oops! {exc.name} did something. There goes a rainbow..."},
4658 )
4659 ```
4660 """
4662 def decorator(func: DecoratedCallable) -> DecoratedCallable: 1abdc
4663 self.add_exception_handler(exc_class_or_status_code, func) 1abdc
4664 return func 1abdc
4666 return decorator 1abdc