fastapi 0.115.12__py3-none-any.whl → 0.115.14__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fastapi might be problematic. Click here for more details.
- fastapi/__init__.py +1 -1
- fastapi/_compat.py +5 -0
- fastapi/applications.py +15 -12
- fastapi/dependencies/utils.py +24 -3
- fastapi/openapi/docs.py +1 -1
- fastapi/routing.py +9 -9
- fastapi/security/oauth2.py +18 -3
- {fastapi-0.115.12.dist-info → fastapi-0.115.14.dist-info}/METADATA +7 -9
- {fastapi-0.115.12.dist-info → fastapi-0.115.14.dist-info}/RECORD +12 -12
- {fastapi-0.115.12.dist-info → fastapi-0.115.14.dist-info}/WHEEL +1 -1
- {fastapi-0.115.12.dist-info → fastapi-0.115.14.dist-info}/entry_points.txt +0 -0
- {fastapi-0.115.12.dist-info → fastapi-0.115.14.dist-info}/licenses/LICENSE +0 -0
fastapi/__init__.py
CHANGED
fastapi/_compat.py
CHANGED
|
@@ -16,6 +16,7 @@ from typing import (
|
|
|
16
16
|
Tuple,
|
|
17
17
|
Type,
|
|
18
18
|
Union,
|
|
19
|
+
cast,
|
|
19
20
|
)
|
|
20
21
|
|
|
21
22
|
from fastapi.exceptions import RequestErrorModel
|
|
@@ -231,6 +232,10 @@ if PYDANTIC_V2:
|
|
|
231
232
|
field_mapping, definitions = schema_generator.generate_definitions(
|
|
232
233
|
inputs=inputs
|
|
233
234
|
)
|
|
235
|
+
for item_def in cast(Dict[str, Dict[str, Any]], definitions).values():
|
|
236
|
+
if "description" in item_def:
|
|
237
|
+
item_description = cast(str, item_def["description"]).split("\f")[0]
|
|
238
|
+
item_def["description"] = item_description
|
|
234
239
|
return field_mapping, definitions # type: ignore[return-value]
|
|
235
240
|
|
|
236
241
|
def is_scalar_field(field: ModelField) -> bool:
|
fastapi/applications.py
CHANGED
|
@@ -748,7 +748,7 @@ class FastAPI(Starlette):
|
|
|
748
748
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
749
749
|
|
|
750
750
|
Read more about it in the
|
|
751
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
751
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
752
752
|
"""
|
|
753
753
|
),
|
|
754
754
|
] = True,
|
|
@@ -1720,7 +1720,7 @@ class FastAPI(Starlette):
|
|
|
1720
1720
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
1721
1721
|
|
|
1722
1722
|
Read more about it in the
|
|
1723
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
1723
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
1724
1724
|
"""
|
|
1725
1725
|
),
|
|
1726
1726
|
] = True,
|
|
@@ -2093,7 +2093,7 @@ class FastAPI(Starlette):
|
|
|
2093
2093
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
2094
2094
|
|
|
2095
2095
|
Read more about it in the
|
|
2096
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
2096
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
2097
2097
|
"""
|
|
2098
2098
|
),
|
|
2099
2099
|
] = True,
|
|
@@ -2471,7 +2471,7 @@ class FastAPI(Starlette):
|
|
|
2471
2471
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
2472
2472
|
|
|
2473
2473
|
Read more about it in the
|
|
2474
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
2474
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
2475
2475
|
"""
|
|
2476
2476
|
),
|
|
2477
2477
|
] = True,
|
|
@@ -2849,7 +2849,7 @@ class FastAPI(Starlette):
|
|
|
2849
2849
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
2850
2850
|
|
|
2851
2851
|
Read more about it in the
|
|
2852
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
2852
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
2853
2853
|
"""
|
|
2854
2854
|
),
|
|
2855
2855
|
] = True,
|
|
@@ -3222,7 +3222,7 @@ class FastAPI(Starlette):
|
|
|
3222
3222
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
3223
3223
|
|
|
3224
3224
|
Read more about it in the
|
|
3225
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
3225
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
3226
3226
|
"""
|
|
3227
3227
|
),
|
|
3228
3228
|
] = True,
|
|
@@ -3595,7 +3595,7 @@ class FastAPI(Starlette):
|
|
|
3595
3595
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
3596
3596
|
|
|
3597
3597
|
Read more about it in the
|
|
3598
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
3598
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
3599
3599
|
"""
|
|
3600
3600
|
),
|
|
3601
3601
|
] = True,
|
|
@@ -3968,7 +3968,7 @@ class FastAPI(Starlette):
|
|
|
3968
3968
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
3969
3969
|
|
|
3970
3970
|
Read more about it in the
|
|
3971
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
3971
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
3972
3972
|
"""
|
|
3973
3973
|
),
|
|
3974
3974
|
] = True,
|
|
@@ -4346,7 +4346,7 @@ class FastAPI(Starlette):
|
|
|
4346
4346
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
4347
4347
|
|
|
4348
4348
|
Read more about it in the
|
|
4349
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
4349
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
4350
4350
|
"""
|
|
4351
4351
|
),
|
|
4352
4352
|
] = True,
|
|
@@ -4425,7 +4425,7 @@ class FastAPI(Starlette):
|
|
|
4425
4425
|
|
|
4426
4426
|
app = FastAPI()
|
|
4427
4427
|
|
|
4428
|
-
@app.
|
|
4428
|
+
@app.trace("/items/{item_id}")
|
|
4429
4429
|
def trace_item(item_id: str):
|
|
4430
4430
|
return None
|
|
4431
4431
|
```
|
|
@@ -4515,14 +4515,17 @@ class FastAPI(Starlette):
|
|
|
4515
4515
|
|
|
4516
4516
|
```python
|
|
4517
4517
|
import time
|
|
4518
|
+
from typing import Awaitable, Callable
|
|
4518
4519
|
|
|
4519
|
-
from fastapi import FastAPI, Request
|
|
4520
|
+
from fastapi import FastAPI, Request, Response
|
|
4520
4521
|
|
|
4521
4522
|
app = FastAPI()
|
|
4522
4523
|
|
|
4523
4524
|
|
|
4524
4525
|
@app.middleware("http")
|
|
4525
|
-
async def add_process_time_header(
|
|
4526
|
+
async def add_process_time_header(
|
|
4527
|
+
request: Request, call_next: Callable[[Request], Awaitable[Response]]
|
|
4528
|
+
) -> Response:
|
|
4526
4529
|
start_time = time.time()
|
|
4527
4530
|
response = await call_next(request)
|
|
4528
4531
|
process_time = time.time() - start_time
|
fastapi/dependencies/utils.py
CHANGED
|
@@ -816,6 +816,25 @@ def request_params_to_args(
|
|
|
816
816
|
return values, errors
|
|
817
817
|
|
|
818
818
|
|
|
819
|
+
def is_union_of_base_models(field_type: Any) -> bool:
|
|
820
|
+
"""Check if field type is a Union where all members are BaseModel subclasses."""
|
|
821
|
+
from fastapi.types import UnionType
|
|
822
|
+
|
|
823
|
+
origin = get_origin(field_type)
|
|
824
|
+
|
|
825
|
+
# Check if it's a Union type (covers both typing.Union and types.UnionType in Python 3.10+)
|
|
826
|
+
if origin is not Union and origin is not UnionType:
|
|
827
|
+
return False
|
|
828
|
+
|
|
829
|
+
union_args = get_args(field_type)
|
|
830
|
+
|
|
831
|
+
for arg in union_args:
|
|
832
|
+
if not lenient_issubclass(arg, BaseModel):
|
|
833
|
+
return False
|
|
834
|
+
|
|
835
|
+
return True
|
|
836
|
+
|
|
837
|
+
|
|
819
838
|
def _should_embed_body_fields(fields: List[ModelField]) -> bool:
|
|
820
839
|
if not fields:
|
|
821
840
|
return False
|
|
@@ -829,10 +848,12 @@ def _should_embed_body_fields(fields: List[ModelField]) -> bool:
|
|
|
829
848
|
# If it explicitly specifies it is embedded, it has to be embedded
|
|
830
849
|
if getattr(first_field.field_info, "embed", None):
|
|
831
850
|
return True
|
|
832
|
-
# If it's a Form (or File) field, it has to be a BaseModel to be top level
|
|
851
|
+
# If it's a Form (or File) field, it has to be a BaseModel (or a union of BaseModels) to be top level
|
|
833
852
|
# otherwise it has to be embedded, so that the key value pair can be extracted
|
|
834
|
-
if
|
|
835
|
-
first_field.
|
|
853
|
+
if (
|
|
854
|
+
isinstance(first_field.field_info, params.Form)
|
|
855
|
+
and not lenient_issubclass(first_field.type_, BaseModel)
|
|
856
|
+
and not is_union_of_base_models(first_field.type_)
|
|
836
857
|
):
|
|
837
858
|
return True
|
|
838
859
|
return False
|
fastapi/openapi/docs.py
CHANGED
|
@@ -188,7 +188,7 @@ def get_redoc_html(
|
|
|
188
188
|
It is normally set to a CDN URL.
|
|
189
189
|
"""
|
|
190
190
|
),
|
|
191
|
-
] = "https://cdn.jsdelivr.net/npm/redoc@
|
|
191
|
+
] = "https://cdn.jsdelivr.net/npm/redoc@2/bundles/redoc.standalone.js",
|
|
192
192
|
redoc_favicon_url: Annotated[
|
|
193
193
|
str,
|
|
194
194
|
Doc(
|
fastapi/routing.py
CHANGED
|
@@ -814,7 +814,7 @@ class APIRouter(routing.Router):
|
|
|
814
814
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
815
815
|
|
|
816
816
|
Read more about it in the
|
|
817
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
817
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
818
818
|
"""
|
|
819
819
|
),
|
|
820
820
|
] = True,
|
|
@@ -1626,7 +1626,7 @@ class APIRouter(routing.Router):
|
|
|
1626
1626
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
1627
1627
|
|
|
1628
1628
|
Read more about it in the
|
|
1629
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
1629
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
1630
1630
|
"""
|
|
1631
1631
|
),
|
|
1632
1632
|
] = True,
|
|
@@ -2003,7 +2003,7 @@ class APIRouter(routing.Router):
|
|
|
2003
2003
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
2004
2004
|
|
|
2005
2005
|
Read more about it in the
|
|
2006
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
2006
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
2007
2007
|
"""
|
|
2008
2008
|
),
|
|
2009
2009
|
] = True,
|
|
@@ -2385,7 +2385,7 @@ class APIRouter(routing.Router):
|
|
|
2385
2385
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
2386
2386
|
|
|
2387
2387
|
Read more about it in the
|
|
2388
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
2388
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
2389
2389
|
"""
|
|
2390
2390
|
),
|
|
2391
2391
|
] = True,
|
|
@@ -2767,7 +2767,7 @@ class APIRouter(routing.Router):
|
|
|
2767
2767
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
2768
2768
|
|
|
2769
2769
|
Read more about it in the
|
|
2770
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
2770
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
2771
2771
|
"""
|
|
2772
2772
|
),
|
|
2773
2773
|
] = True,
|
|
@@ -3144,7 +3144,7 @@ class APIRouter(routing.Router):
|
|
|
3144
3144
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
3145
3145
|
|
|
3146
3146
|
Read more about it in the
|
|
3147
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
3147
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
3148
3148
|
"""
|
|
3149
3149
|
),
|
|
3150
3150
|
] = True,
|
|
@@ -3521,7 +3521,7 @@ class APIRouter(routing.Router):
|
|
|
3521
3521
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
3522
3522
|
|
|
3523
3523
|
Read more about it in the
|
|
3524
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
3524
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
3525
3525
|
"""
|
|
3526
3526
|
),
|
|
3527
3527
|
] = True,
|
|
@@ -3903,7 +3903,7 @@ class APIRouter(routing.Router):
|
|
|
3903
3903
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
3904
3904
|
|
|
3905
3905
|
Read more about it in the
|
|
3906
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
3906
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
3907
3907
|
"""
|
|
3908
3908
|
),
|
|
3909
3909
|
] = True,
|
|
@@ -4285,7 +4285,7 @@ class APIRouter(routing.Router):
|
|
|
4285
4285
|
This affects the generated OpenAPI (e.g. visible at `/docs`).
|
|
4286
4286
|
|
|
4287
4287
|
Read more about it in the
|
|
4288
|
-
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
|
|
4288
|
+
[FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi).
|
|
4289
4289
|
"""
|
|
4290
4290
|
),
|
|
4291
4291
|
] = True,
|
fastapi/security/oauth2.py
CHANGED
|
@@ -85,7 +85,7 @@ class OAuth2PasswordRequestForm:
|
|
|
85
85
|
],
|
|
86
86
|
password: Annotated[
|
|
87
87
|
str,
|
|
88
|
-
Form(),
|
|
88
|
+
Form(json_schema_extra={"format": "password"}),
|
|
89
89
|
Doc(
|
|
90
90
|
"""
|
|
91
91
|
`password` string. The OAuth2 spec requires the exact field name
|
|
@@ -130,7 +130,7 @@ class OAuth2PasswordRequestForm:
|
|
|
130
130
|
] = None,
|
|
131
131
|
client_secret: Annotated[
|
|
132
132
|
Union[str, None],
|
|
133
|
-
Form(),
|
|
133
|
+
Form(json_schema_extra={"format": "password"}),
|
|
134
134
|
Doc(
|
|
135
135
|
"""
|
|
136
136
|
If there's a `client_password` (and a `client_id`), they can be sent
|
|
@@ -457,11 +457,26 @@ class OAuth2PasswordBearer(OAuth2):
|
|
|
457
457
|
"""
|
|
458
458
|
),
|
|
459
459
|
] = True,
|
|
460
|
+
refreshUrl: Annotated[
|
|
461
|
+
Optional[str],
|
|
462
|
+
Doc(
|
|
463
|
+
"""
|
|
464
|
+
The URL to refresh the token and obtain a new one.
|
|
465
|
+
"""
|
|
466
|
+
),
|
|
467
|
+
] = None,
|
|
460
468
|
):
|
|
461
469
|
if not scopes:
|
|
462
470
|
scopes = {}
|
|
463
471
|
flows = OAuthFlowsModel(
|
|
464
|
-
password=cast(
|
|
472
|
+
password=cast(
|
|
473
|
+
Any,
|
|
474
|
+
{
|
|
475
|
+
"tokenUrl": tokenUrl,
|
|
476
|
+
"refreshUrl": refreshUrl,
|
|
477
|
+
"scopes": scopes,
|
|
478
|
+
},
|
|
479
|
+
)
|
|
465
480
|
)
|
|
466
481
|
super().__init__(
|
|
467
482
|
flows=flows,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fastapi
|
|
3
|
-
Version: 0.115.
|
|
3
|
+
Version: 0.115.14
|
|
4
4
|
Summary: FastAPI framework, high performance, easy to learn, fast to code, ready for production
|
|
5
5
|
Author-Email: =?utf-8?q?Sebasti=C3=A1n_Ram=C3=ADrez?= <tiangolo@gmail.com>
|
|
6
6
|
Classifier: Intended Audience :: Information Technology
|
|
@@ -113,22 +113,20 @@ The key features are:
|
|
|
113
113
|
|
|
114
114
|
<a href="https://blockbee.io?ref=fastapi" target="_blank" title="BlockBee Cryptocurrency Payment Gateway"><img src="https://fastapi.tiangolo.com/img/sponsors/blockbee.png"></a>
|
|
115
115
|
<a href="https://platform.sh/try-it-now/?utm_source=fastapi-signup&utm_medium=banner&utm_campaign=FastAPI-signup-June-2023" target="_blank" title="Build, run and scale your apps on a modern, reliable, and secure PaaS."><img src="https://fastapi.tiangolo.com/img/sponsors/platform-sh.png"></a>
|
|
116
|
-
<a href="https://www.porter.run" target="_blank" title="Deploy FastAPI on AWS with a few clicks"><img src="https://fastapi.tiangolo.com/img/sponsors/porter.png"></a>
|
|
117
|
-
<a href="https://bump.sh/fastapi?utm_source=fastapi&utm_medium=referral&utm_campaign=sponsor" target="_blank" title="Automate FastAPI documentation generation with Bump.sh"><img src="https://fastapi.tiangolo.com/img/sponsors/bump-sh.svg"></a>
|
|
118
116
|
<a href="https://github.com/scalar/scalar/?utm_source=fastapi&utm_medium=website&utm_campaign=main-badge" target="_blank" title="Scalar: Beautiful Open-Source API References from Swagger/OpenAPI files"><img src="https://fastapi.tiangolo.com/img/sponsors/scalar.svg"></a>
|
|
119
117
|
<a href="https://www.propelauth.com/?utm_source=fastapi&utm_campaign=1223&utm_medium=mainbadge" target="_blank" title="Auth, user management and more for your B2B product"><img src="https://fastapi.tiangolo.com/img/sponsors/propelauth.png"></a>
|
|
120
|
-
<a href="https://
|
|
121
|
-
<a href="https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi/?utm_campaign=fastapi_framework&utm_source=fastapi_sponsorship&utm_medium=web_referral" target="_blank" title="Simplify Full Stack Development with FastAPI & MongoDB"><img src="https://fastapi.tiangolo.com/img/sponsors/mongodb.png"></a>
|
|
122
|
-
<a href="https://zuplo.link/fastapi-gh" target="_blank" title="Zuplo: Scale, Protect, Document, and Monetize your FastAPI"><img src="https://fastapi.tiangolo.com/img/sponsors/zuplo.png"></a>
|
|
118
|
+
<a href="https://zuplo.link/fastapi-gh" target="_blank" title="Zuplo: Deploy, Secure, Document, and Monetize your FastAPI"><img src="https://fastapi.tiangolo.com/img/sponsors/zuplo.png"></a>
|
|
123
119
|
<a href="https://liblab.com?utm_source=fastapi" target="_blank" title="liblab - Generate SDKs from FastAPI"><img src="https://fastapi.tiangolo.com/img/sponsors/liblab.png"></a>
|
|
124
120
|
<a href="https://docs.render.com/deploy-fastapi?utm_source=deploydoc&utm_medium=referral&utm_campaign=fastapi" target="_blank" title="Deploy & scale any full-stack web app on Render. Focus on building apps, not infra."><img src="https://fastapi.tiangolo.com/img/sponsors/render.svg"></a>
|
|
125
121
|
<a href="https://www.coderabbit.ai/?utm_source=fastapi&utm_medium=badge&utm_campaign=fastapi" target="_blank" title="Cut Code Review Time & Bugs in Half with CodeRabbit"><img src="https://fastapi.tiangolo.com/img/sponsors/coderabbit.png"></a>
|
|
126
|
-
<a href="https://
|
|
122
|
+
<a href="https://subtotal.com/?utm_source=fastapi&utm_medium=sponsorship&utm_campaign=open-source" target="_blank" title="The Gold Standard in Retail Account Linking"><img src="https://fastapi.tiangolo.com/img/sponsors/subtotal.svg"></a>
|
|
127
123
|
<a href="https://databento.com/" target="_blank" title="Pay as you go for market data"><img src="https://fastapi.tiangolo.com/img/sponsors/databento.svg"></a>
|
|
128
|
-
<a href="https://speakeasy.com?utm_source=fastapi+repo&utm_medium=github+sponsorship" target="_blank" title="SDKs for your API | Speakeasy"><img src="https://fastapi.tiangolo.com/img/sponsors/speakeasy.png"></a>
|
|
124
|
+
<a href="https://speakeasy.com/editor?utm_source=fastapi+repo&utm_medium=github+sponsorship" target="_blank" title="SDKs for your API | Speakeasy"><img src="https://fastapi.tiangolo.com/img/sponsors/speakeasy.png"></a>
|
|
129
125
|
<a href="https://www.svix.com/" target="_blank" title="Svix - Webhooks as a service"><img src="https://fastapi.tiangolo.com/img/sponsors/svix.svg"></a>
|
|
130
126
|
<a href="https://www.stainlessapi.com/?utm_source=fastapi&utm_medium=referral" target="_blank" title="Stainless | Generate best-in-class SDKs"><img src="https://fastapi.tiangolo.com/img/sponsors/stainless.png"></a>
|
|
131
127
|
<a href="https://www.permit.io/blog/implement-authorization-in-fastapi?utm_source=github&utm_medium=referral&utm_campaign=fastapi" target="_blank" title="Fine-Grained Authorization for FastAPI"><img src="https://fastapi.tiangolo.com/img/sponsors/permit.png"></a>
|
|
128
|
+
<a href="https://www.interviewpal.com/?utm_source=fastapi&utm_medium=open-source&utm_campaign=dev-hiring" target="_blank" title="InterviewPal - AI Interview Coach for Engineers and Devs"><img src="https://fastapi.tiangolo.com/img/sponsors/interviewpal.png"></a>
|
|
129
|
+
<a href="https://dribia.com/en/" target="_blank" title="Dribia - Data Science within your reach"><img src="https://fastapi.tiangolo.com/img/sponsors/dribia.png"></a>
|
|
132
130
|
|
|
133
131
|
<!-- /sponsors -->
|
|
134
132
|
|
|
@@ -215,7 +213,7 @@ $ pip install "fastapi[standard]"
|
|
|
215
213
|
|
|
216
214
|
### Create it
|
|
217
215
|
|
|
218
|
-
|
|
216
|
+
Create a file `main.py` with:
|
|
219
217
|
|
|
220
218
|
```Python
|
|
221
219
|
from typing import Union
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
fastapi-0.115.
|
|
2
|
-
fastapi-0.115.
|
|
3
|
-
fastapi-0.115.
|
|
4
|
-
fastapi-0.115.
|
|
5
|
-
fastapi/__init__.py,sha256=
|
|
1
|
+
fastapi-0.115.14.dist-info/METADATA,sha256=BKQS5L_nvCHYJUCYQujjjM8dxMoJDV84thmsHYxZiI0,27180
|
|
2
|
+
fastapi-0.115.14.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
|
|
3
|
+
fastapi-0.115.14.dist-info/entry_points.txt,sha256=GCf-WbIZxyGT4MUmrPGj1cOHYZoGsNPHAvNkT6hnGeA,61
|
|
4
|
+
fastapi-0.115.14.dist-info/licenses/LICENSE,sha256=Tsif_IFIW5f-xYSy1KlhAy7v_oNEU4lP2cEnSQbMdE4,1086
|
|
5
|
+
fastapi/__init__.py,sha256=zto_Knb1xNkut8EXy4Q4enLzjY6UIFsGKNCJUQpgcwc,1082
|
|
6
6
|
fastapi/__main__.py,sha256=bKePXLdO4SsVSM6r9SVoLickJDcR2c0cTOxZRKq26YQ,37
|
|
7
|
-
fastapi/_compat.py,sha256=
|
|
8
|
-
fastapi/applications.py,sha256=
|
|
7
|
+
fastapi/_compat.py,sha256=PwGTZd6d-u2o6YF9M8pQahuBtD_3q3Kpj7vU5-ngChc,24228
|
|
8
|
+
fastapi/applications.py,sha256=rZTr0Ix-vdMwh6MQGCI_NC-Ir9lpfIGHHBY-JnNWZ_E,176550
|
|
9
9
|
fastapi/background.py,sha256=rouLirxUANrcYC824MSMypXL_Qb2HYg2YZqaiEqbEKI,1768
|
|
10
10
|
fastapi/cli.py,sha256=OYhZb0NR_deuT5ofyPF2NoNBzZDNOP8Salef2nk-HqA,418
|
|
11
11
|
fastapi/concurrency.py,sha256=MirfowoSpkMQZ8j_g0ZxaQKpV6eB3G-dB5TgcXCrgEA,1424
|
|
12
12
|
fastapi/datastructures.py,sha256=b2PEz77XGq-u3Ur1Inwk0AGjOsQZO49yF9C7IPJ15cY,5766
|
|
13
13
|
fastapi/dependencies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
fastapi/dependencies/models.py,sha256=Pjl6vx-4nZ5Tta9kJa3-RfQKkXtCpS09-FhMgs9eWNs,1507
|
|
15
|
-
fastapi/dependencies/utils.py,sha256=
|
|
15
|
+
fastapi/dependencies/utils.py,sha256=wGN-BAb0NpG-89nA_OllS0F4wYwGfhHgb8IuT3MTqck,36619
|
|
16
16
|
fastapi/encoders.py,sha256=LvwYmFeOz4tVwvgBoC5rvZnbr7hZr73KGrU8O7zSptU,11068
|
|
17
17
|
fastapi/exception_handlers.py,sha256=MBrIOA-ugjJDivIi4rSsUJBdTsjuzN76q4yh0q1COKw,1332
|
|
18
18
|
fastapi/exceptions.py,sha256=taNixuFEXb67lI1bnX1ubq8y8TseJ4yoPlWjyP0fTzk,4969
|
|
@@ -25,7 +25,7 @@ fastapi/middleware/trustedhost.py,sha256=eE5XGRxGa7c5zPnMJDGp3BxaL25k5iVQlhnv-Pk
|
|
|
25
25
|
fastapi/middleware/wsgi.py,sha256=Z3Ue-7wni4lUZMvH3G9ek__acgYdJstbnpZX_HQAboY,79
|
|
26
26
|
fastapi/openapi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
27
|
fastapi/openapi/constants.py,sha256=adGzmis1L1HJRTE3kJ5fmHS_Noq6tIY6pWv_SFzoFDU,153
|
|
28
|
-
fastapi/openapi/docs.py,sha256=
|
|
28
|
+
fastapi/openapi/docs.py,sha256=zSDv4xY6XHcKsaG4zyk1HqSnrZtfZFBB0J7ZBk5YHPE,10345
|
|
29
29
|
fastapi/openapi/models.py,sha256=PqkxQiqcEgjKuhfUIWPZPQcyTcubtUCB3vcObLsB7VE,15397
|
|
30
30
|
fastapi/openapi/utils.py,sha256=e00G_p0IdpiffBUaq31BUyiloXbpld8RryKYnYKisdY,23964
|
|
31
31
|
fastapi/param_functions.py,sha256=JHNPLIYvoAwdnZZavIVsxOat8x23fX_Kl33reh7HKl8,64019
|
|
@@ -33,12 +33,12 @@ fastapi/params.py,sha256=g450axUBQgQJODdtM7WBxZbQj9Z64inFvadrgHikBbU,28237
|
|
|
33
33
|
fastapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
34
34
|
fastapi/requests.py,sha256=zayepKFcienBllv3snmWI20Gk0oHNVLU4DDhqXBb4LU,142
|
|
35
35
|
fastapi/responses.py,sha256=QNQQlwpKhQoIPZTTWkpc9d_QGeGZ_aVQPaDV3nQ8m7c,1761
|
|
36
|
-
fastapi/routing.py,sha256=
|
|
36
|
+
fastapi/routing.py,sha256=gnGRnOzM-CBOYj7hI0bZlC_5c-RQKh6BPmlsDD8IVUo,176315
|
|
37
37
|
fastapi/security/__init__.py,sha256=bO8pNmxqVRXUjfl2mOKiVZLn0FpBQ61VUYVjmppnbJw,881
|
|
38
38
|
fastapi/security/api_key.py,sha256=cBI5Z4zWVjL1uJrsjTeLy7MafHPAO2HQPzTrpyoIYWA,9094
|
|
39
39
|
fastapi/security/base.py,sha256=dl4pvbC-RxjfbWgPtCWd8MVU-7CB2SZ22rJDXVCXO6c,141
|
|
40
40
|
fastapi/security/http.py,sha256=rWR2x-5CUsjWmRucYthwRig6MG1o-boyrr4Xo-PuuxU,13606
|
|
41
|
-
fastapi/security/oauth2.py,sha256=
|
|
41
|
+
fastapi/security/oauth2.py,sha256=M1AFIDT7G3oQChq83poI3eg8ZDeibcvnGmya2CTS7JY,22036
|
|
42
42
|
fastapi/security/open_id_connect_url.py,sha256=8vizZ2tGqEp1ur8SwtVgyHJhGAJ5AqahgcvSpaIioDI,2722
|
|
43
43
|
fastapi/security/utils.py,sha256=bd8T0YM7UQD5ATKucr1bNtAvz_Y3__dVNAv5UebiPvc,293
|
|
44
44
|
fastapi/staticfiles.py,sha256=iirGIt3sdY2QZXd36ijs3Cj-T0FuGFda3cd90kM9Ikw,69
|
|
@@ -47,4 +47,4 @@ fastapi/testclient.py,sha256=nBvaAmX66YldReJNZXPOk1sfuo2Q6hs8bOvIaCep6LQ,66
|
|
|
47
47
|
fastapi/types.py,sha256=nFb36sK3DSoqoyo7Miwy3meKK5UdFBgkAgLSzQlUVyI,383
|
|
48
48
|
fastapi/utils.py,sha256=y8Bj5ttMaI9tS4D60OUgXqKnktBr99NdYUnHHV9LgoY,7948
|
|
49
49
|
fastapi/websockets.py,sha256=419uncYObEKZG0YcrXscfQQYLSWoE10jqxVMetGdR98,222
|
|
50
|
-
fastapi-0.115.
|
|
50
|
+
fastapi-0.115.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|