|
|
@ -79,6 +79,9 @@ def Path( # noqa: N802 |
|
|
Doc( |
|
|
Doc( |
|
|
""" |
|
|
""" |
|
|
Human-readable title. |
|
|
Human-readable title. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs for Path Parameters and Numeric Validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#declare-metadata) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -96,6 +99,9 @@ def Path( # noqa: N802 |
|
|
""" |
|
|
""" |
|
|
Greater than. If set, value must be greater than this. Only applicable to |
|
|
Greater than. If set, value must be greater than this. Only applicable to |
|
|
numbers. |
|
|
numbers. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Path parameters numeric validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#number-validations-greater-than-and-less-than-or-equal) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -105,6 +111,9 @@ def Path( # noqa: N802 |
|
|
""" |
|
|
""" |
|
|
Greater than or equal. If set, value must be greater than or equal to |
|
|
Greater than or equal. If set, value must be greater than or equal to |
|
|
this. Only applicable to numbers. |
|
|
this. Only applicable to numbers. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Path parameters numeric validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#number-validations-greater-than-and-less-than-or-equal) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -113,6 +122,9 @@ def Path( # noqa: N802 |
|
|
Doc( |
|
|
Doc( |
|
|
""" |
|
|
""" |
|
|
Less than. If set, value must be less than this. Only applicable to numbers. |
|
|
Less than. If set, value must be less than this. Only applicable to numbers. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Path parameters numeric validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#number-validations-greater-than-and-less-than-or-equal) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -122,6 +134,9 @@ def Path( # noqa: N802 |
|
|
""" |
|
|
""" |
|
|
Less than or equal. If set, value must be less than or equal to this. |
|
|
Less than or equal. If set, value must be less than or equal to this. |
|
|
Only applicable to numbers. |
|
|
Only applicable to numbers. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Path parameters numeric validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#number-validations-greater-than-and-less-than-or-equal) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -213,6 +228,9 @@ def Path( # noqa: N802 |
|
|
Doc( |
|
|
Doc( |
|
|
""" |
|
|
""" |
|
|
Example values for this field. |
|
|
Example values for this field. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -343,6 +361,9 @@ def Query( # noqa: N802 |
|
|
Doc( |
|
|
Doc( |
|
|
""" |
|
|
""" |
|
|
Default value if the parameter field is not set. |
|
|
Default value if the parameter field is not set. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#alternative-old-query-as-the-default-value) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = Undefined, |
|
|
] = Undefined, |
|
|
@ -367,6 +388,9 @@ def Query( # noqa: N802 |
|
|
This will be used to extract the data and for the generated OpenAPI. |
|
|
This will be used to extract the data and for the generated OpenAPI. |
|
|
It is particularly useful when you can't use the name you want because it |
|
|
It is particularly useful when you can't use the name you want because it |
|
|
is a Python reserved keyword or similar. |
|
|
is a Python reserved keyword or similar. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#alias-parameters) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -402,6 +426,9 @@ def Query( # noqa: N802 |
|
|
Doc( |
|
|
Doc( |
|
|
""" |
|
|
""" |
|
|
Human-readable title. |
|
|
Human-readable title. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#declare-more-metadata) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -410,6 +437,9 @@ def Query( # noqa: N802 |
|
|
Doc( |
|
|
Doc( |
|
|
""" |
|
|
""" |
|
|
Human-readable description. |
|
|
Human-readable description. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#declare-more-metadata) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -419,6 +449,9 @@ def Query( # noqa: N802 |
|
|
""" |
|
|
""" |
|
|
Greater than. If set, value must be greater than this. Only applicable to |
|
|
Greater than. If set, value must be greater than this. Only applicable to |
|
|
numbers. |
|
|
numbers. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Path parameters numeric validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#number-validations-greater-than-and-less-than-or-equal) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -428,6 +461,9 @@ def Query( # noqa: N802 |
|
|
""" |
|
|
""" |
|
|
Greater than or equal. If set, value must be greater than or equal to |
|
|
Greater than or equal. If set, value must be greater than or equal to |
|
|
this. Only applicable to numbers. |
|
|
this. Only applicable to numbers. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Path parameters numeric validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#number-validations-greater-than-and-less-than-or-equal) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -436,6 +472,9 @@ def Query( # noqa: N802 |
|
|
Doc( |
|
|
Doc( |
|
|
""" |
|
|
""" |
|
|
Less than. If set, value must be less than this. Only applicable to numbers. |
|
|
Less than. If set, value must be less than this. Only applicable to numbers. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Path parameters numeric validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#number-validations-greater-than-and-less-than-or-equal) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -445,6 +484,9 @@ def Query( # noqa: N802 |
|
|
""" |
|
|
""" |
|
|
Less than or equal. If set, value must be less than or equal to this. |
|
|
Less than or equal. If set, value must be less than or equal to this. |
|
|
Only applicable to numbers. |
|
|
Only applicable to numbers. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Path parameters numeric validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#number-validations-greater-than-and-less-than-or-equal) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -453,6 +495,9 @@ def Query( # noqa: N802 |
|
|
Doc( |
|
|
Doc( |
|
|
""" |
|
|
""" |
|
|
Minimum length for strings. |
|
|
Minimum length for strings. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -461,6 +506,9 @@ def Query( # noqa: N802 |
|
|
Doc( |
|
|
Doc( |
|
|
""" |
|
|
""" |
|
|
Maximum length for strings. |
|
|
Maximum length for strings. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -469,6 +517,9 @@ def Query( # noqa: N802 |
|
|
Doc( |
|
|
Doc( |
|
|
""" |
|
|
""" |
|
|
RegEx pattern for strings. |
|
|
RegEx pattern for strings. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#add-regular-expressions |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -536,6 +587,9 @@ def Query( # noqa: N802 |
|
|
Doc( |
|
|
Doc( |
|
|
""" |
|
|
""" |
|
|
Example values for this field. |
|
|
Example values for this field. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -570,6 +624,9 @@ def Query( # noqa: N802 |
|
|
Mark this parameter field as deprecated. |
|
|
Mark this parameter field as deprecated. |
|
|
|
|
|
|
|
|
It will affect the generated OpenAPI (e.g. visible at `/docs`). |
|
|
It will affect the generated OpenAPI (e.g. visible at `/docs`). |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#deprecating-parameters) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -581,6 +638,9 @@ def Query( # noqa: N802 |
|
|
You probably don't need it, but it's available. |
|
|
You probably don't need it, but it's available. |
|
|
|
|
|
|
|
|
This affects the generated OpenAPI (e.g. visible at `/docs`). |
|
|
This affects the generated OpenAPI (e.g. visible at `/docs`). |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about Query parameters](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-parameters-from-openapi |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = True, |
|
|
] = True, |
|
|
@ -849,6 +909,9 @@ def Header( # noqa: N802 |
|
|
Doc( |
|
|
Doc( |
|
|
""" |
|
|
""" |
|
|
Example values for this field. |
|
|
Example values for this field. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -1152,6 +1215,9 @@ def Cookie( # noqa: N802 |
|
|
Doc( |
|
|
Doc( |
|
|
""" |
|
|
""" |
|
|
Example values for this field. |
|
|
Example values for this field. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -1477,6 +1543,9 @@ def Body( # noqa: N802 |
|
|
Doc( |
|
|
Doc( |
|
|
""" |
|
|
""" |
|
|
Example values for this field. |
|
|
Example values for this field. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -1790,6 +1859,9 @@ def Form( # noqa: N802 |
|
|
Doc( |
|
|
Doc( |
|
|
""" |
|
|
""" |
|
|
Example values for this field. |
|
|
Example values for this field. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -2102,6 +2174,9 @@ def File( # noqa: N802 |
|
|
Doc( |
|
|
Doc( |
|
|
""" |
|
|
""" |
|
|
Example values for this field. |
|
|
Example values for this field. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -2215,6 +2290,9 @@ def Depends( # noqa: N802 |
|
|
|
|
|
|
|
|
Don't call it directly, FastAPI will call it for you, just pass the object |
|
|
Don't call it directly, FastAPI will call it for you, just pass the object |
|
|
directly. |
|
|
directly. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs for Dependencies](https://fastapi.tiangolo.com/tutorial/dependencies/) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -2230,6 +2308,9 @@ def Depends( # noqa: N802 |
|
|
|
|
|
|
|
|
Set `use_cache` to `False` to disable this behavior and ensure the |
|
|
Set `use_cache` to `False` to disable this behavior and ensure the |
|
|
dependency is called again (if declared more than once) in the same request. |
|
|
dependency is called again (if declared more than once) in the same request. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about sub-dependencies](https://fastapi.tiangolo.com/tutorial/dependencies/sub-dependencies/#using-the-same-dependency-multiple-times) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = True, |
|
|
] = True, |
|
|
@ -2250,6 +2331,9 @@ def Depends( # noqa: N802 |
|
|
that handles the request (similar to when using `"function"`), but end |
|
|
that handles the request (similar to when using `"function"`), but end |
|
|
**after** the response is sent back to the client. So, the dependency |
|
|
**after** the response is sent back to the client. So, the dependency |
|
|
function will be executed **around** the **request** and response cycle. |
|
|
function will be executed **around** the **request** and response cycle. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs for FastAPI Dependencies with yield](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#early-exit-and-scope) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -2295,6 +2379,9 @@ def Security( # noqa: N802 |
|
|
|
|
|
|
|
|
Don't call it directly, FastAPI will call it for you, just pass the object |
|
|
Don't call it directly, FastAPI will call it for you, just pass the object |
|
|
directly. |
|
|
directly. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs for Dependencies](https://fastapi.tiangolo.com/tutorial/dependencies/) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -2312,7 +2399,9 @@ def Security( # noqa: N802 |
|
|
|
|
|
|
|
|
These scopes are integrated with OpenAPI (and the API docs at `/docs`). |
|
|
These scopes are integrated with OpenAPI (and the API docs at `/docs`). |
|
|
So they are visible in the OpenAPI specification. |
|
|
So they are visible in the OpenAPI specification. |
|
|
) |
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about OAuth2 scopes](https://fastapi.tiangolo.com/advanced/security/oauth2-scopes/) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = None, |
|
|
] = None, |
|
|
@ -2327,6 +2416,9 @@ def Security( # noqa: N802 |
|
|
|
|
|
|
|
|
Set `use_cache` to `False` to disable this behavior and ensure the |
|
|
Set `use_cache` to `False` to disable this behavior and ensure the |
|
|
dependency is called again (if declared more than once) in the same request. |
|
|
dependency is called again (if declared more than once) in the same request. |
|
|
|
|
|
|
|
|
|
|
|
Read more about it in the |
|
|
|
|
|
[FastAPI docs about sub-dependencies](https://fastapi.tiangolo.com/tutorial/dependencies/sub-dependencies/#using-the-same-dependency-multiple-times) |
|
|
""" |
|
|
""" |
|
|
), |
|
|
), |
|
|
] = True, |
|
|
] = True, |
|
|
|