default value if the parameter field is not set this doesn t affect path parameters as the value is always required the parameter is available only for compatibility a callable to generate the default value this doesn t affect path parameters as the value is always required the parameter is available only for compatibility an alternative name for the parameter field 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 is a python reserved keyword or similar priority of the alias this affects whether an alias generator is used todo update when deprecating pydantic v1 import these types validationalias str aliaspath aliaschoices none whitelist validation step the parameter field will be the single one allowed by the alias or set of aliases defined blacklist validation step the vanilla parameter field will be the single one of the alias or set of aliases fields and all the other fields will be ignored at serialization time humanreadable title humanreadable description greater than if set value must be greater than this only applicable to numbers greater than or equal if set value must be greater than or equal to this only applicable to numbers less than if set value must be less than this only applicable to numbers less than or equal if set value must be less than or equal to this only applicable to numbers minimum length for strings maximum length for strings regex pattern for strings regex pattern for strings parameter field name for discriminating the type in a tagged union if true strict validation is applied to the field value must be a multiple of this only applicable to numbers allow inf inf nan only applicable to numbers maximum number of allow digits for strings maximum number of decimal places allowed for numbers example values for this field openapispecific examples it will be added to the generated openapi e g visible at docs swagger ui that provides the docs interface has better support for the openapispecific examples than the json schema examples that s the main use case for this read more about it in the fastapi docs for declare request example datahttps fastapi tiangolo comtutorialschemaextraexampleusingtheopenapiexamplesparameter mark this parameter field as deprecated it will affect the generated openapi e g visible at docs to include or not this parameter field in the generated openapi you probably don t need it but it s available this affects the generated openapi e g visible at docs any additional json schema data include extra fields used by the json schema the extra kwargs is deprecated use jsonschemaextra instead declare a path parameter for a path operation read more about it in the fastapi docs for path parameters and numeric validationshttps fastapi tiangolo comtutorialpathparamsnumericvalidations python from typing import annotated from fastapi import fastapi path app fastapi app getitemsitemid async def readitems itemid annotatedint pathtitlethe id of the item to get return itemid itemid default value if the parameter field is not set a callable to generate the default value this doesn t affect path parameters as the value is always required the parameter is available only for compatibility an alternative name for the parameter field 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 is a python reserved keyword or similar priority of the alias this affects whether an alias generator is used todo update when deprecating pydantic v1 import these types validationalias str aliaspath aliaschoices none whitelist validation step the parameter field will be the single one allowed by the alias or set of aliases defined blacklist validation step the vanilla parameter field will be the single one of the alias or set of aliases fields and all the other fields will be ignored at serialization time humanreadable title humanreadable description greater than if set value must be greater than this only applicable to numbers greater than or equal if set value must be greater than or equal to this only applicable to numbers less than if set value must be less than this only applicable to numbers less than or equal if set value must be less than or equal to this only applicable to numbers minimum length for strings maximum length for strings regex pattern for strings regex pattern for strings parameter field name for discriminating the type in a tagged union if true strict validation is applied to the field value must be a multiple of this only applicable to numbers allow inf inf nan only applicable to numbers maximum number of allow digits for strings maximum number of decimal places allowed for numbers example values for this field openapispecific examples it will be added to the generated openapi e g visible at docs swagger ui that provides the docs interface has better support for the openapispecific examples than the json schema examples that s the main use case for this read more about it in the fastapi docs for declare request example datahttps fastapi tiangolo comtutorialschemaextraexampleusingtheopenapiexamplesparameter mark this parameter field as deprecated it will affect the generated openapi e g visible at docs to include or not this parameter field in the generated openapi you probably don t need it but it s available this affects the generated openapi e g visible at docs any additional json schema data include extra fields used by the json schema the extra kwargs is deprecated use jsonschemaextra instead default value if the parameter field is not set a callable to generate the default value this doesn t affect path parameters as the value is always required the parameter is available only for compatibility an alternative name for the parameter field 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 is a python reserved keyword or similar priority of the alias this affects whether an alias generator is used todo update when deprecating pydantic v1 import these types validationalias str aliaspath aliaschoices none whitelist validation step the parameter field will be the single one allowed by the alias or set of aliases defined blacklist validation step the vanilla parameter field will be the single one of the alias or set of aliases fields and all the other fields will be ignored at serialization time automatically convert underscores to hyphens in the parameter field name read more about it in the fastapi docs for header parametershttps fastapi tiangolo comtutorialheaderparamsautomaticconversion humanreadable title humanreadable description greater than if set value must be greater than this only applicable to numbers greater than or equal if set value must be greater than or equal to this only applicable to numbers less than if set value must be less than this only applicable to numbers less than or equal if set value must be less than or equal to this only applicable to numbers minimum length for strings maximum length for strings regex pattern for strings regex pattern for strings parameter field name for discriminating the type in a tagged union if true strict validation is applied to the field value must be a multiple of this only applicable to numbers allow inf inf nan only applicable to numbers maximum number of allow digits for strings maximum number of decimal places allowed for numbers example values for this field openapispecific examples it will be added to the generated openapi e g visible at docs swagger ui that provides the docs interface has better support for the openapispecific examples than the json schema examples that s the main use case for this read more about it in the fastapi docs for declare request example datahttps fastapi tiangolo comtutorialschemaextraexampleusingtheopenapiexamplesparameter mark this parameter field as deprecated it will affect the generated openapi e g visible at docs to include or not this parameter field in the generated openapi you probably don t need it but it s available this affects the generated openapi e g visible at docs any additional json schema data include extra fields used by the json schema the extra kwargs is deprecated use jsonschemaextra instead default value if the parameter field is not set a callable to generate the default value this doesn t affect path parameters as the value is always required the parameter is available only for compatibility an alternative name for the parameter field 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 is a python reserved keyword or similar priority of the alias this affects whether an alias generator is used todo update when deprecating pydantic v1 import these types validationalias str aliaspath aliaschoices none whitelist validation step the parameter field will be the single one allowed by the alias or set of aliases defined blacklist validation step the vanilla parameter field will be the single one of the alias or set of aliases fields and all the other fields will be ignored at serialization time humanreadable title humanreadable description greater than if set value must be greater than this only applicable to numbers greater than or equal if set value must be greater than or equal to this only applicable to numbers less than if set value must be less than this only applicable to numbers less than or equal if set value must be less than or equal to this only applicable to numbers minimum length for strings maximum length for strings regex pattern for strings regex pattern for strings parameter field name for discriminating the type in a tagged union if true strict validation is applied to the field value must be a multiple of this only applicable to numbers allow inf inf nan only applicable to numbers maximum number of allow digits for strings maximum number of decimal places allowed for numbers example values for this field openapispecific examples it will be added to the generated openapi e g visible at docs swagger ui that provides the docs interface has better support for the openapispecific examples than the json schema examples that s the main use case for this read more about it in the fastapi docs for declare request example datahttps fastapi tiangolo comtutorialschemaextraexampleusingtheopenapiexamplesparameter mark this parameter field as deprecated it will affect the generated openapi e g visible at docs to include or not this parameter field in the generated openapi you probably don t need it but it s available this affects the generated openapi e g visible at docs any additional json schema data include extra fields used by the json schema the extra kwargs is deprecated use jsonschemaextra instead default value if the parameter field is not set a callable to generate the default value this doesn t affect path parameters as the value is always required the parameter is available only for compatibility when embed is true the parameter will be expected in a json body as a key instead of being the json body itself this happens automatically when more than one body parameter is declared read more about it in the fastapi docs for body multiple parametershttps fastapi tiangolo comtutorialbodymultipleparamsembedasinglebodyparameter the media type of this parameter field changing it would affect the generated openapi but currently it doesn t affect the parsing of the data an alternative name for the parameter field 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 is a python reserved keyword or similar priority of the alias this affects whether an alias generator is used todo update when deprecating pydantic v1 import these types validationalias str aliaspath aliaschoices none whitelist validation step the parameter field will be the single one allowed by the alias or set of aliases defined blacklist validation step the vanilla parameter field will be the single one of the alias or set of aliases fields and all the other fields will be ignored at serialization time humanreadable title humanreadable description greater than if set value must be greater than this only applicable to numbers greater than or equal if set value must be greater than or equal to this only applicable to numbers less than if set value must be less than this only applicable to numbers less than or equal if set value must be less than or equal to this only applicable to numbers minimum length for strings maximum length for strings regex pattern for strings regex pattern for strings parameter field name for discriminating the type in a tagged union if true strict validation is applied to the field value must be a multiple of this only applicable to numbers allow inf inf nan only applicable to numbers maximum number of allow digits for strings maximum number of decimal places allowed for numbers example values for this field openapispecific examples it will be added to the generated openapi e g visible at docs swagger ui that provides the docs interface has better support for the openapispecific examples than the json schema examples that s the main use case for this read more about it in the fastapi docs for declare request example datahttps fastapi tiangolo comtutorialschemaextraexampleusingtheopenapiexamplesparameter mark this parameter field as deprecated it will affect the generated openapi e g visible at docs to include or not this parameter field in the generated openapi you probably don t need it but it s available this affects the generated openapi e g visible at docs any additional json schema data include extra fields used by the json schema the extra kwargs is deprecated use jsonschemaextra instead default value if the parameter field is not set a callable to generate the default value this doesn t affect path parameters as the value is always required the parameter is available only for compatibility the media type of this parameter field changing it would affect the generated openapi but currently it doesn t affect the parsing of the data an alternative name for the parameter field 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 is a python reserved keyword or similar priority of the alias this affects whether an alias generator is used todo update when deprecating pydantic v1 import these types validationalias str aliaspath aliaschoices none whitelist validation step the parameter field will be the single one allowed by the alias or set of aliases defined blacklist validation step the vanilla parameter field will be the single one of the alias or set of aliases fields and all the other fields will be ignored at serialization time humanreadable title humanreadable description greater than if set value must be greater than this only applicable to numbers greater than or equal if set value must be greater than or equal to this only applicable to numbers less than if set value must be less than this only applicable to numbers less than or equal if set value must be less than or equal to this only applicable to numbers minimum length for strings maximum length for strings regex pattern for strings regex pattern for strings parameter field name for discriminating the type in a tagged union if true strict validation is applied to the field value must be a multiple of this only applicable to numbers allow inf inf nan only applicable to numbers maximum number of allow digits for strings maximum number of decimal places allowed for numbers example values for this field openapispecific examples it will be added to the generated openapi e g visible at docs swagger ui that provides the docs interface has better support for the openapispecific examples than the json schema examples that s the main use case for this read more about it in the fastapi docs for declare request example datahttps fastapi tiangolo comtutorialschemaextraexampleusingtheopenapiexamplesparameter mark this parameter field as deprecated it will affect the generated openapi e g visible at docs to include or not this parameter field in the generated openapi you probably don t need it but it s available this affects the generated openapi e g visible at docs any additional json schema data include extra fields used by the json schema the extra kwargs is deprecated use jsonschemaextra instead default value if the parameter field is not set a callable to generate the default value this doesn t affect path parameters as the value is always required the parameter is available only for compatibility the media type of this parameter field changing it would affect the generated openapi but currently it doesn t affect the parsing of the data an alternative name for the parameter field 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 is a python reserved keyword or similar priority of the alias this affects whether an alias generator is used todo update when deprecating pydantic v1 import these types validationalias str aliaspath aliaschoices none whitelist validation step the parameter field will be the single one allowed by the alias or set of aliases defined blacklist validation step the vanilla parameter field will be the single one of the alias or set of aliases fields and all the other fields will be ignored at serialization time humanreadable title humanreadable description greater than if set value must be greater than this only applicable to numbers greater than or equal if set value must be greater than or equal to this only applicable to numbers less than if set value must be less than this only applicable to numbers less than or equal if set value must be less than or equal to this only applicable to numbers minimum length for strings maximum length for strings regex pattern for strings regex pattern for strings parameter field name for discriminating the type in a tagged union if true strict validation is applied to the field value must be a multiple of this only applicable to numbers allow inf inf nan only applicable to numbers maximum number of allow digits for strings maximum number of decimal places allowed for numbers example values for this field openapispecific examples it will be added to the generated openapi e g visible at docs swagger ui that provides the docs interface has better support for the openapispecific examples than the json schema examples that s the main use case for this read more about it in the fastapi docs for declare request example datahttps fastapi tiangolo comtutorialschemaextraexampleusingtheopenapiexamplesparameter mark this parameter field as deprecated it will affect the generated openapi e g visible at docs to include or not this parameter field in the generated openapi you probably don t need it but it s available this affects the generated openapi e g visible at docs any additional json schema data include extra fields used by the json schema the extra kwargs is deprecated use jsonschemaextra instead a dependable callable like a function don t call it directly fastapi will call it for you just pass the object directly by default after a dependency is called the first time in a request if the dependency is declared again for the rest of the request for example if the dependency is needed by several dependencies the value will be reused for the rest of the request set usecache to false to disable this behavior and ensure the dependency is called again if declared more than once in the same request declare a fastapi dependency it takes a single dependable callable like a function don t call it directly fastapi will call it for you read more about it in the fastapi docs for dependencieshttps fastapi tiangolo comtutorialdependencies example python from typing import annotated from fastapi import depends fastapi app fastapi async def commonparametersq str none none skip int 0 limit int 100 return q q skip skip limit limit app getitems async def readitemscommons annotateddict dependscommonparameters return commons a dependable callable like a function don t call it directly fastapi will call it for you just pass the object directly oauth2 scopes required for the path operation that uses this security dependency the term scope comes from the oauth2 specification it seems to be intentionaly vague and interpretable it normally refers to permissions in cases to roles these scopes are integrated with openapi and the api docs at docs so they are visible in the openapi specification by default after a dependency is called the first time in a request if the dependency is declared again for the rest of the request for example if the dependency is needed by several dependencies the value will be reused for the rest of the request set usecache to false to disable this behavior and ensure the dependency is called again if declared more than once in the same request declare a fastapi security dependency the only difference with a regular dependency is that it can declare oauth2 scopes that will be integrated with openapi and the automatic ui docs by default at docs it takes a single dependable callable like a function don t call it directly fastapi will call it for you read more about it in the fastapi docs for securityhttps fastapi tiangolo comtutorialsecurity and in the fastapi docs for oauth2 scopeshttps fastapi tiangolo comadvancedsecurityoauth2scopes example python from typing import annotated from fastapi import depends fastapi from db import user from security import getcurrentactiveuser app fastapi app getusersmeitems async def readownitems currentuser annotateduser securitygetcurrentactiveuser scopesitems return itemid foo owner currentuser username type ignore attr defined noqa n802 default value if the parameter field is not set this doesn t affect path parameters as the value is always required the parameter is available only for compatibility a callable to generate the default value this doesn t affect path parameters as the value is always required the parameter is available only for compatibility an alternative name for the parameter field 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 is a python reserved keyword or similar priority of the alias this affects whether an alias generator is used todo update when deprecating pydantic v1 import these types validation_alias str aliaspath aliaschoices none whitelist validation step the parameter field will be the single one allowed by the alias or set of aliases defined blacklist validation step the vanilla parameter field will be the single one of the alias or set of aliases fields and all the other fields will be ignored at serialization time human readable title human readable description greater than if set value must be greater than this only applicable to numbers greater than or equal if set value must be greater than or equal to this only applicable to numbers less than if set value must be less than this only applicable to numbers less than or equal if set value must be less than or equal to this only applicable to numbers minimum length for strings maximum length for strings regex pattern for strings regex pattern for strings parameter field name for discriminating the type in a tagged union if true strict validation is applied to the field value must be a multiple of this only applicable to numbers allow inf inf nan only applicable to numbers maximum number of allow digits for strings maximum number of decimal places allowed for numbers example values for this field openapi specific examples it will be added to the generated openapi e g visible at docs swagger ui that provides the docs interface has better support for the openapi specific examples than the json schema examples that s the main use case for this read more about it in the fastapi docs for declare request example data https fastapi tiangolo com tutorial schema extra example using the openapi_examples parameter mark this parameter field as deprecated it will affect the generated openapi e g visible at docs to include or not this parameter field in the generated openapi you probably don t need it but it s available this affects the generated openapi e g visible at docs any additional json schema data include extra fields used by the json schema the extra kwargs is deprecated use json_schema_extra instead declare a path parameter for a path operation read more about it in the fastapi docs for path parameters and numeric validations https fastapi tiangolo com tutorial path params numeric validations python from typing import annotated from fastapi import fastapi path app fastapi app get items item_id async def read_items item_id annotated int path title the id of the item to get return item_id item_id noqa n802 default value if the parameter field is not set a callable to generate the default value this doesn t affect path parameters as the value is always required the parameter is available only for compatibility an alternative name for the parameter field 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 is a python reserved keyword or similar priority of the alias this affects whether an alias generator is used todo update when deprecating pydantic v1 import these types validation_alias str aliaspath aliaschoices none whitelist validation step the parameter field will be the single one allowed by the alias or set of aliases defined blacklist validation step the vanilla parameter field will be the single one of the alias or set of aliases fields and all the other fields will be ignored at serialization time human readable title human readable description greater than if set value must be greater than this only applicable to numbers greater than or equal if set value must be greater than or equal to this only applicable to numbers less than if set value must be less than this only applicable to numbers less than or equal if set value must be less than or equal to this only applicable to numbers minimum length for strings maximum length for strings regex pattern for strings regex pattern for strings parameter field name for discriminating the type in a tagged union if true strict validation is applied to the field value must be a multiple of this only applicable to numbers allow inf inf nan only applicable to numbers maximum number of allow digits for strings maximum number of decimal places allowed for numbers example values for this field openapi specific examples it will be added to the generated openapi e g visible at docs swagger ui that provides the docs interface has better support for the openapi specific examples than the json schema examples that s the main use case for this read more about it in the fastapi docs for declare request example data https fastapi tiangolo com tutorial schema extra example using the openapi_examples parameter mark this parameter field as deprecated it will affect the generated openapi e g visible at docs to include or not this parameter field in the generated openapi you probably don t need it but it s available this affects the generated openapi e g visible at docs any additional json schema data include extra fields used by the json schema the extra kwargs is deprecated use json_schema_extra instead noqa n802 default value if the parameter field is not set a callable to generate the default value this doesn t affect path parameters as the value is always required the parameter is available only for compatibility an alternative name for the parameter field 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 is a python reserved keyword or similar priority of the alias this affects whether an alias generator is used todo update when deprecating pydantic v1 import these types validation_alias str aliaspath aliaschoices none whitelist validation step the parameter field will be the single one allowed by the alias or set of aliases defined blacklist validation step the vanilla parameter field will be the single one of the alias or set of aliases fields and all the other fields will be ignored at serialization time automatically convert underscores to hyphens in the parameter field name read more about it in the fastapi docs for header parameters https fastapi tiangolo com tutorial header params automatic conversion human readable title human readable description greater than if set value must be greater than this only applicable to numbers greater than or equal if set value must be greater than or equal to this only applicable to numbers less than if set value must be less than this only applicable to numbers less than or equal if set value must be less than or equal to this only applicable to numbers minimum length for strings maximum length for strings regex pattern for strings regex pattern for strings parameter field name for discriminating the type in a tagged union if true strict validation is applied to the field value must be a multiple of this only applicable to numbers allow inf inf nan only applicable to numbers maximum number of allow digits for strings maximum number of decimal places allowed for numbers example values for this field openapi specific examples it will be added to the generated openapi e g visible at docs swagger ui that provides the docs interface has better support for the openapi specific examples than the json schema examples that s the main use case for this read more about it in the fastapi docs for declare request example data https fastapi tiangolo com tutorial schema extra example using the openapi_examples parameter mark this parameter field as deprecated it will affect the generated openapi e g visible at docs to include or not this parameter field in the generated openapi you probably don t need it but it s available this affects the generated openapi e g visible at docs any additional json schema data include extra fields used by the json schema the extra kwargs is deprecated use json_schema_extra instead noqa n802 default value if the parameter field is not set a callable to generate the default value this doesn t affect path parameters as the value is always required the parameter is available only for compatibility an alternative name for the parameter field 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 is a python reserved keyword or similar priority of the alias this affects whether an alias generator is used todo update when deprecating pydantic v1 import these types validation_alias str aliaspath aliaschoices none whitelist validation step the parameter field will be the single one allowed by the alias or set of aliases defined blacklist validation step the vanilla parameter field will be the single one of the alias or set of aliases fields and all the other fields will be ignored at serialization time human readable title human readable description greater than if set value must be greater than this only applicable to numbers greater than or equal if set value must be greater than or equal to this only applicable to numbers less than if set value must be less than this only applicable to numbers less than or equal if set value must be less than or equal to this only applicable to numbers minimum length for strings maximum length for strings regex pattern for strings regex pattern for strings parameter field name for discriminating the type in a tagged union if true strict validation is applied to the field value must be a multiple of this only applicable to numbers allow inf inf nan only applicable to numbers maximum number of allow digits for strings maximum number of decimal places allowed for numbers example values for this field openapi specific examples it will be added to the generated openapi e g visible at docs swagger ui that provides the docs interface has better support for the openapi specific examples than the json schema examples that s the main use case for this read more about it in the fastapi docs for declare request example data https fastapi tiangolo com tutorial schema extra example using the openapi_examples parameter mark this parameter field as deprecated it will affect the generated openapi e g visible at docs to include or not this parameter field in the generated openapi you probably don t need it but it s available this affects the generated openapi e g visible at docs any additional json schema data include extra fields used by the json schema the extra kwargs is deprecated use json_schema_extra instead noqa n802 default value if the parameter field is not set a callable to generate the default value this doesn t affect path parameters as the value is always required the parameter is available only for compatibility when embed is true the parameter will be expected in a json body as a key instead of being the json body itself this happens automatically when more than one body parameter is declared read more about it in the fastapi docs for body multiple parameters https fastapi tiangolo com tutorial body multiple params embed a single body parameter the media type of this parameter field changing it would affect the generated openapi but currently it doesn t affect the parsing of the data an alternative name for the parameter field 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 is a python reserved keyword or similar priority of the alias this affects whether an alias generator is used todo update when deprecating pydantic v1 import these types validation_alias str aliaspath aliaschoices none whitelist validation step the parameter field will be the single one allowed by the alias or set of aliases defined blacklist validation step the vanilla parameter field will be the single one of the alias or set of aliases fields and all the other fields will be ignored at serialization time human readable title human readable description greater than if set value must be greater than this only applicable to numbers greater than or equal if set value must be greater than or equal to this only applicable to numbers less than if set value must be less than this only applicable to numbers less than or equal if set value must be less than or equal to this only applicable to numbers minimum length for strings maximum length for strings regex pattern for strings regex pattern for strings parameter field name for discriminating the type in a tagged union if true strict validation is applied to the field value must be a multiple of this only applicable to numbers allow inf inf nan only applicable to numbers maximum number of allow digits for strings maximum number of decimal places allowed for numbers example values for this field openapi specific examples it will be added to the generated openapi e g visible at docs swagger ui that provides the docs interface has better support for the openapi specific examples than the json schema examples that s the main use case for this read more about it in the fastapi docs for declare request example data https fastapi tiangolo com tutorial schema extra example using the openapi_examples parameter mark this parameter field as deprecated it will affect the generated openapi e g visible at docs to include or not this parameter field in the generated openapi you probably don t need it but it s available this affects the generated openapi e g visible at docs any additional json schema data include extra fields used by the json schema the extra kwargs is deprecated use json_schema_extra instead noqa n802 default value if the parameter field is not set a callable to generate the default value this doesn t affect path parameters as the value is always required the parameter is available only for compatibility the media type of this parameter field changing it would affect the generated openapi but currently it doesn t affect the parsing of the data an alternative name for the parameter field 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 is a python reserved keyword or similar priority of the alias this affects whether an alias generator is used todo update when deprecating pydantic v1 import these types validation_alias str aliaspath aliaschoices none whitelist validation step the parameter field will be the single one allowed by the alias or set of aliases defined blacklist validation step the vanilla parameter field will be the single one of the alias or set of aliases fields and all the other fields will be ignored at serialization time human readable title human readable description greater than if set value must be greater than this only applicable to numbers greater than or equal if set value must be greater than or equal to this only applicable to numbers less than if set value must be less than this only applicable to numbers less than or equal if set value must be less than or equal to this only applicable to numbers minimum length for strings maximum length for strings regex pattern for strings regex pattern for strings parameter field name for discriminating the type in a tagged union if true strict validation is applied to the field value must be a multiple of this only applicable to numbers allow inf inf nan only applicable to numbers maximum number of allow digits for strings maximum number of decimal places allowed for numbers example values for this field openapi specific examples it will be added to the generated openapi e g visible at docs swagger ui that provides the docs interface has better support for the openapi specific examples than the json schema examples that s the main use case for this read more about it in the fastapi docs for declare request example data https fastapi tiangolo com tutorial schema extra example using the openapi_examples parameter mark this parameter field as deprecated it will affect the generated openapi e g visible at docs to include or not this parameter field in the generated openapi you probably don t need it but it s available this affects the generated openapi e g visible at docs any additional json schema data include extra fields used by the json schema the extra kwargs is deprecated use json_schema_extra instead noqa n802 default value if the parameter field is not set a callable to generate the default value this doesn t affect path parameters as the value is always required the parameter is available only for compatibility the media type of this parameter field changing it would affect the generated openapi but currently it doesn t affect the parsing of the data an alternative name for the parameter field 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 is a python reserved keyword or similar priority of the alias this affects whether an alias generator is used todo update when deprecating pydantic v1 import these types validation_alias str aliaspath aliaschoices none whitelist validation step the parameter field will be the single one allowed by the alias or set of aliases defined blacklist validation step the vanilla parameter field will be the single one of the alias or set of aliases fields and all the other fields will be ignored at serialization time human readable title human readable description greater than if set value must be greater than this only applicable to numbers greater than or equal if set value must be greater than or equal to this only applicable to numbers less than if set value must be less than this only applicable to numbers less than or equal if set value must be less than or equal to this only applicable to numbers minimum length for strings maximum length for strings regex pattern for strings regex pattern for strings parameter field name for discriminating the type in a tagged union if true strict validation is applied to the field value must be a multiple of this only applicable to numbers allow inf inf nan only applicable to numbers maximum number of allow digits for strings maximum number of decimal places allowed for numbers example values for this field openapi specific examples it will be added to the generated openapi e g visible at docs swagger ui that provides the docs interface has better support for the openapi specific examples than the json schema examples that s the main use case for this read more about it in the fastapi docs for declare request example data https fastapi tiangolo com tutorial schema extra example using the openapi_examples parameter mark this parameter field as deprecated it will affect the generated openapi e g visible at docs to include or not this parameter field in the generated openapi you probably don t need it but it s available this affects the generated openapi e g visible at docs any additional json schema data include extra fields used by the json schema the extra kwargs is deprecated use json_schema_extra instead noqa n802 a dependable callable like a function don t call it directly fastapi will call it for you just pass the object directly by default after a dependency is called the first time in a request if the dependency is declared again for the rest of the request for example if the dependency is needed by several dependencies the value will be re used for the rest of the request 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 declare a fastapi dependency it takes a single dependable callable like a function don t call it directly fastapi will call it for you read more about it in the fastapi docs for dependencies https fastapi tiangolo com tutorial dependencies example python from typing import annotated from fastapi import depends fastapi app fastapi async def common_parameters q str none none skip int 0 limit int 100 return q q skip skip limit limit app get items async def read_items commons annotated dict depends common_parameters return commons noqa n802 a dependable callable like a function don t call it directly fastapi will call it for you just pass the object directly oauth2 scopes required for the path operation that uses this security dependency the term scope comes from the oauth2 specification it seems to be intentionaly vague and interpretable it normally refers to permissions in cases to roles these scopes are integrated with openapi and the api docs at docs so they are visible in the openapi specification by default after a dependency is called the first time in a request if the dependency is declared again for the rest of the request for example if the dependency is needed by several dependencies the value will be re used for the rest of the request 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 declare a fastapi security dependency the only difference with a regular dependency is that it can declare oauth2 scopes that will be integrated with openapi and the automatic ui docs by default at docs it takes a single dependable callable like a function don t call it directly fastapi will call it for you read more about it in the fastapi docs for security https fastapi tiangolo com tutorial security and in the fastapi docs for oauth2 scopes https fastapi tiangolo com advanced security oauth2 scopes example python from typing import annotated from fastapi import depends fastapi from db import user from security import get_current_active_user app fastapi app get users me items async def read_own_items current_user annotated user security get_current_active_user scopes items return item_id foo owner current_user username
from typing import Any, Callable, Dict, List, Optional, Sequence, Union

from fastapi import params
from fastapi._compat import Undefined
from fastapi.openapi.models import Example
from typing_extensions import Annotated, Doc, deprecated  

_Unset: Any = Undefined


def Path(  
    default: Annotated[
        Any,
        Doc(
            
        ),
    ] = ...,
    *,
    default_factory: Annotated[
        Union[Callable[[], Any], None],
        Doc(
            
        ),
    ] = _Unset,
    alias: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    alias_priority: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    
    
    validation_alias: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    serialization_alias: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    title: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    description: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    gt: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    ge: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    lt: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    le: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    min_length: Annotated[
        Optional[int],
        Doc(
            
        ),
    ] = None,
    max_length: Annotated[
        Optional[int],
        Doc(
            
        ),
    ] = None,
    pattern: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    regex: Annotated[
        Optional[str],
        Doc(
            
        ),
        deprecated(
            "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."
        ),
    ] = None,
    discriminator: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    strict: Annotated[
        Union[bool, None],
        Doc(
            
        ),
    ] = _Unset,
    multiple_of: Annotated[
        Union[float, None],
        Doc(
            
        ),
    ] = _Unset,
    allow_inf_nan: Annotated[
        Union[bool, None],
        Doc(
            
        ),
    ] = _Unset,
    max_digits: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    decimal_places: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    examples: Annotated[
        Optional[List[Any]],
        Doc(
            
        ),
    ] = None,
    example: Annotated[
        Optional[Any],
        deprecated(
            "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "
            "although still supported. Use examples instead."
        ),
    ] = _Unset,
    openapi_examples: Annotated[
        Optional[Dict[str, Example]],
        Doc(
            
        ),
    ] = None,
    deprecated: Annotated[
        Optional[bool],
        Doc(
            
        ),
    ] = None,
    include_in_schema: Annotated[
        bool,
        Doc(
            
        ),
    ] = True,
    json_schema_extra: Annotated[
        Union[Dict[str, Any], None],
        Doc(
            
        ),
    ] = None,
    **extra: Annotated[
        Any,
        Doc(
            
        ),
        deprecated(
            
        ),
    ],
) -> Any:
    
    return params.Path(
        default=default,
        default_factory=default_factory,
        alias=alias,
        alias_priority=alias_priority,
        validation_alias=validation_alias,
        serialization_alias=serialization_alias,
        title=title,
        description=description,
        gt=gt,
        ge=ge,
        lt=lt,
        le=le,
        min_length=min_length,
        max_length=max_length,
        pattern=pattern,
        regex=regex,
        discriminator=discriminator,
        strict=strict,
        multiple_of=multiple_of,
        allow_inf_nan=allow_inf_nan,
        max_digits=max_digits,
        decimal_places=decimal_places,
        example=example,
        examples=examples,
        openapi_examples=openapi_examples,
        deprecated=deprecated,
        include_in_schema=include_in_schema,
        json_schema_extra=json_schema_extra,
        **extra,
    )


def Query(  
    default: Annotated[
        Any,
        Doc(
            
        ),
    ] = Undefined,
    *,
    default_factory: Annotated[
        Union[Callable[[], Any], None],
        Doc(
            
        ),
    ] = _Unset,
    alias: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    alias_priority: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    
    
    validation_alias: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    serialization_alias: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    title: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    description: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    gt: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    ge: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    lt: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    le: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    min_length: Annotated[
        Optional[int],
        Doc(
            
        ),
    ] = None,
    max_length: Annotated[
        Optional[int],
        Doc(
            
        ),
    ] = None,
    pattern: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    regex: Annotated[
        Optional[str],
        Doc(
            
        ),
        deprecated(
            "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."
        ),
    ] = None,
    discriminator: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    strict: Annotated[
        Union[bool, None],
        Doc(
            
        ),
    ] = _Unset,
    multiple_of: Annotated[
        Union[float, None],
        Doc(
            
        ),
    ] = _Unset,
    allow_inf_nan: Annotated[
        Union[bool, None],
        Doc(
            
        ),
    ] = _Unset,
    max_digits: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    decimal_places: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    examples: Annotated[
        Optional[List[Any]],
        Doc(
            
        ),
    ] = None,
    example: Annotated[
        Optional[Any],
        deprecated(
            "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "
            "although still supported. Use examples instead."
        ),
    ] = _Unset,
    openapi_examples: Annotated[
        Optional[Dict[str, Example]],
        Doc(
            
        ),
    ] = None,
    deprecated: Annotated[
        Optional[bool],
        Doc(
            
        ),
    ] = None,
    include_in_schema: Annotated[
        bool,
        Doc(
            
        ),
    ] = True,
    json_schema_extra: Annotated[
        Union[Dict[str, Any], None],
        Doc(
            
        ),
    ] = None,
    **extra: Annotated[
        Any,
        Doc(
            
        ),
        deprecated(
            
        ),
    ],
) -> Any:
    return params.Query(
        default=default,
        default_factory=default_factory,
        alias=alias,
        alias_priority=alias_priority,
        validation_alias=validation_alias,
        serialization_alias=serialization_alias,
        title=title,
        description=description,
        gt=gt,
        ge=ge,
        lt=lt,
        le=le,
        min_length=min_length,
        max_length=max_length,
        pattern=pattern,
        regex=regex,
        discriminator=discriminator,
        strict=strict,
        multiple_of=multiple_of,
        allow_inf_nan=allow_inf_nan,
        max_digits=max_digits,
        decimal_places=decimal_places,
        example=example,
        examples=examples,
        openapi_examples=openapi_examples,
        deprecated=deprecated,
        include_in_schema=include_in_schema,
        json_schema_extra=json_schema_extra,
        **extra,
    )


def Header(  
    default: Annotated[
        Any,
        Doc(
            
        ),
    ] = Undefined,
    *,
    default_factory: Annotated[
        Union[Callable[[], Any], None],
        Doc(
            
        ),
    ] = _Unset,
    alias: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    alias_priority: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    
    
    validation_alias: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    serialization_alias: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    convert_underscores: Annotated[
        bool,
        Doc(
            
        ),
    ] = True,
    title: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    description: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    gt: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    ge: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    lt: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    le: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    min_length: Annotated[
        Optional[int],
        Doc(
            
        ),
    ] = None,
    max_length: Annotated[
        Optional[int],
        Doc(
            
        ),
    ] = None,
    pattern: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    regex: Annotated[
        Optional[str],
        Doc(
            
        ),
        deprecated(
            "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."
        ),
    ] = None,
    discriminator: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    strict: Annotated[
        Union[bool, None],
        Doc(
            
        ),
    ] = _Unset,
    multiple_of: Annotated[
        Union[float, None],
        Doc(
            
        ),
    ] = _Unset,
    allow_inf_nan: Annotated[
        Union[bool, None],
        Doc(
            
        ),
    ] = _Unset,
    max_digits: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    decimal_places: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    examples: Annotated[
        Optional[List[Any]],
        Doc(
            
        ),
    ] = None,
    example: Annotated[
        Optional[Any],
        deprecated(
            "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "
            "although still supported. Use examples instead."
        ),
    ] = _Unset,
    openapi_examples: Annotated[
        Optional[Dict[str, Example]],
        Doc(
            
        ),
    ] = None,
    deprecated: Annotated[
        Optional[bool],
        Doc(
            
        ),
    ] = None,
    include_in_schema: Annotated[
        bool,
        Doc(
            
        ),
    ] = True,
    json_schema_extra: Annotated[
        Union[Dict[str, Any], None],
        Doc(
            
        ),
    ] = None,
    **extra: Annotated[
        Any,
        Doc(
            
        ),
        deprecated(
            
        ),
    ],
) -> Any:
    return params.Header(
        default=default,
        default_factory=default_factory,
        alias=alias,
        alias_priority=alias_priority,
        validation_alias=validation_alias,
        serialization_alias=serialization_alias,
        convert_underscores=convert_underscores,
        title=title,
        description=description,
        gt=gt,
        ge=ge,
        lt=lt,
        le=le,
        min_length=min_length,
        max_length=max_length,
        pattern=pattern,
        regex=regex,
        discriminator=discriminator,
        strict=strict,
        multiple_of=multiple_of,
        allow_inf_nan=allow_inf_nan,
        max_digits=max_digits,
        decimal_places=decimal_places,
        example=example,
        examples=examples,
        openapi_examples=openapi_examples,
        deprecated=deprecated,
        include_in_schema=include_in_schema,
        json_schema_extra=json_schema_extra,
        **extra,
    )


def Cookie(  
    default: Annotated[
        Any,
        Doc(
            
        ),
    ] = Undefined,
    *,
    default_factory: Annotated[
        Union[Callable[[], Any], None],
        Doc(
            
        ),
    ] = _Unset,
    alias: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    alias_priority: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    
    
    validation_alias: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    serialization_alias: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    title: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    description: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    gt: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    ge: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    lt: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    le: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    min_length: Annotated[
        Optional[int],
        Doc(
            
        ),
    ] = None,
    max_length: Annotated[
        Optional[int],
        Doc(
            
        ),
    ] = None,
    pattern: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    regex: Annotated[
        Optional[str],
        Doc(
            
        ),
        deprecated(
            "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."
        ),
    ] = None,
    discriminator: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    strict: Annotated[
        Union[bool, None],
        Doc(
            
        ),
    ] = _Unset,
    multiple_of: Annotated[
        Union[float, None],
        Doc(
            
        ),
    ] = _Unset,
    allow_inf_nan: Annotated[
        Union[bool, None],
        Doc(
            
        ),
    ] = _Unset,
    max_digits: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    decimal_places: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    examples: Annotated[
        Optional[List[Any]],
        Doc(
            
        ),
    ] = None,
    example: Annotated[
        Optional[Any],
        deprecated(
            "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "
            "although still supported. Use examples instead."
        ),
    ] = _Unset,
    openapi_examples: Annotated[
        Optional[Dict[str, Example]],
        Doc(
            
        ),
    ] = None,
    deprecated: Annotated[
        Optional[bool],
        Doc(
            
        ),
    ] = None,
    include_in_schema: Annotated[
        bool,
        Doc(
            
        ),
    ] = True,
    json_schema_extra: Annotated[
        Union[Dict[str, Any], None],
        Doc(
            
        ),
    ] = None,
    **extra: Annotated[
        Any,
        Doc(
            
        ),
        deprecated(
            
        ),
    ],
) -> Any:
    return params.Cookie(
        default=default,
        default_factory=default_factory,
        alias=alias,
        alias_priority=alias_priority,
        validation_alias=validation_alias,
        serialization_alias=serialization_alias,
        title=title,
        description=description,
        gt=gt,
        ge=ge,
        lt=lt,
        le=le,
        min_length=min_length,
        max_length=max_length,
        pattern=pattern,
        regex=regex,
        discriminator=discriminator,
        strict=strict,
        multiple_of=multiple_of,
        allow_inf_nan=allow_inf_nan,
        max_digits=max_digits,
        decimal_places=decimal_places,
        example=example,
        examples=examples,
        openapi_examples=openapi_examples,
        deprecated=deprecated,
        include_in_schema=include_in_schema,
        json_schema_extra=json_schema_extra,
        **extra,
    )


def Body(  
    default: Annotated[
        Any,
        Doc(
            
        ),
    ] = Undefined,
    *,
    default_factory: Annotated[
        Union[Callable[[], Any], None],
        Doc(
            
        ),
    ] = _Unset,
    embed: Annotated[
        bool,
        Doc(
            
        ),
    ] = False,
    media_type: Annotated[
        str,
        Doc(
            
        ),
    ] = "application/json",
    alias: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    alias_priority: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    
    
    validation_alias: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    serialization_alias: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    title: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    description: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    gt: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    ge: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    lt: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    le: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    min_length: Annotated[
        Optional[int],
        Doc(
            
        ),
    ] = None,
    max_length: Annotated[
        Optional[int],
        Doc(
            
        ),
    ] = None,
    pattern: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    regex: Annotated[
        Optional[str],
        Doc(
            
        ),
        deprecated(
            "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."
        ),
    ] = None,
    discriminator: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    strict: Annotated[
        Union[bool, None],
        Doc(
            
        ),
    ] = _Unset,
    multiple_of: Annotated[
        Union[float, None],
        Doc(
            
        ),
    ] = _Unset,
    allow_inf_nan: Annotated[
        Union[bool, None],
        Doc(
            
        ),
    ] = _Unset,
    max_digits: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    decimal_places: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    examples: Annotated[
        Optional[List[Any]],
        Doc(
            
        ),
    ] = None,
    example: Annotated[
        Optional[Any],
        deprecated(
            "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "
            "although still supported. Use examples instead."
        ),
    ] = _Unset,
    openapi_examples: Annotated[
        Optional[Dict[str, Example]],
        Doc(
            
        ),
    ] = None,
    deprecated: Annotated[
        Optional[bool],
        Doc(
            
        ),
    ] = None,
    include_in_schema: Annotated[
        bool,
        Doc(
            
        ),
    ] = True,
    json_schema_extra: Annotated[
        Union[Dict[str, Any], None],
        Doc(
            
        ),
    ] = None,
    **extra: Annotated[
        Any,
        Doc(
            
        ),
        deprecated(
            
        ),
    ],
) -> Any:
    return params.Body(
        default=default,
        default_factory=default_factory,
        embed=embed,
        media_type=media_type,
        alias=alias,
        alias_priority=alias_priority,
        validation_alias=validation_alias,
        serialization_alias=serialization_alias,
        title=title,
        description=description,
        gt=gt,
        ge=ge,
        lt=lt,
        le=le,
        min_length=min_length,
        max_length=max_length,
        pattern=pattern,
        regex=regex,
        discriminator=discriminator,
        strict=strict,
        multiple_of=multiple_of,
        allow_inf_nan=allow_inf_nan,
        max_digits=max_digits,
        decimal_places=decimal_places,
        example=example,
        examples=examples,
        openapi_examples=openapi_examples,
        deprecated=deprecated,
        include_in_schema=include_in_schema,
        json_schema_extra=json_schema_extra,
        **extra,
    )


def Form(  
    default: Annotated[
        Any,
        Doc(
            
        ),
    ] = Undefined,
    *,
    default_factory: Annotated[
        Union[Callable[[], Any], None],
        Doc(
            
        ),
    ] = _Unset,
    media_type: Annotated[
        str,
        Doc(
            
        ),
    ] = "application/x-www-form-urlencoded",
    alias: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    alias_priority: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    
    
    validation_alias: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    serialization_alias: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    title: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    description: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    gt: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    ge: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    lt: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    le: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    min_length: Annotated[
        Optional[int],
        Doc(
            
        ),
    ] = None,
    max_length: Annotated[
        Optional[int],
        Doc(
            
        ),
    ] = None,
    pattern: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    regex: Annotated[
        Optional[str],
        Doc(
            
        ),
        deprecated(
            "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."
        ),
    ] = None,
    discriminator: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    strict: Annotated[
        Union[bool, None],
        Doc(
            
        ),
    ] = _Unset,
    multiple_of: Annotated[
        Union[float, None],
        Doc(
            
        ),
    ] = _Unset,
    allow_inf_nan: Annotated[
        Union[bool, None],
        Doc(
            
        ),
    ] = _Unset,
    max_digits: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    decimal_places: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    examples: Annotated[
        Optional[List[Any]],
        Doc(
            
        ),
    ] = None,
    example: Annotated[
        Optional[Any],
        deprecated(
            "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "
            "although still supported. Use examples instead."
        ),
    ] = _Unset,
    openapi_examples: Annotated[
        Optional[Dict[str, Example]],
        Doc(
            
        ),
    ] = None,
    deprecated: Annotated[
        Optional[bool],
        Doc(
            
        ),
    ] = None,
    include_in_schema: Annotated[
        bool,
        Doc(
            
        ),
    ] = True,
    json_schema_extra: Annotated[
        Union[Dict[str, Any], None],
        Doc(
            
        ),
    ] = None,
    **extra: Annotated[
        Any,
        Doc(
            
        ),
        deprecated(
            
        ),
    ],
) -> Any:
    return params.Form(
        default=default,
        default_factory=default_factory,
        media_type=media_type,
        alias=alias,
        alias_priority=alias_priority,
        validation_alias=validation_alias,
        serialization_alias=serialization_alias,
        title=title,
        description=description,
        gt=gt,
        ge=ge,
        lt=lt,
        le=le,
        min_length=min_length,
        max_length=max_length,
        pattern=pattern,
        regex=regex,
        discriminator=discriminator,
        strict=strict,
        multiple_of=multiple_of,
        allow_inf_nan=allow_inf_nan,
        max_digits=max_digits,
        decimal_places=decimal_places,
        example=example,
        examples=examples,
        openapi_examples=openapi_examples,
        deprecated=deprecated,
        include_in_schema=include_in_schema,
        json_schema_extra=json_schema_extra,
        **extra,
    )


def File(  
    default: Annotated[
        Any,
        Doc(
            
        ),
    ] = Undefined,
    *,
    default_factory: Annotated[
        Union[Callable[[], Any], None],
        Doc(
            
        ),
    ] = _Unset,
    media_type: Annotated[
        str,
        Doc(
            
        ),
    ] = "multipart/form-data",
    alias: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    alias_priority: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    
    
    validation_alias: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    serialization_alias: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    title: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    description: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    gt: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    ge: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    lt: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    le: Annotated[
        Optional[float],
        Doc(
            
        ),
    ] = None,
    min_length: Annotated[
        Optional[int],
        Doc(
            
        ),
    ] = None,
    max_length: Annotated[
        Optional[int],
        Doc(
            
        ),
    ] = None,
    pattern: Annotated[
        Optional[str],
        Doc(
            
        ),
    ] = None,
    regex: Annotated[
        Optional[str],
        Doc(
            
        ),
        deprecated(
            "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead."
        ),
    ] = None,
    discriminator: Annotated[
        Union[str, None],
        Doc(
            
        ),
    ] = None,
    strict: Annotated[
        Union[bool, None],
        Doc(
            
        ),
    ] = _Unset,
    multiple_of: Annotated[
        Union[float, None],
        Doc(
            
        ),
    ] = _Unset,
    allow_inf_nan: Annotated[
        Union[bool, None],
        Doc(
            
        ),
    ] = _Unset,
    max_digits: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    decimal_places: Annotated[
        Union[int, None],
        Doc(
            
        ),
    ] = _Unset,
    examples: Annotated[
        Optional[List[Any]],
        Doc(
            
        ),
    ] = None,
    example: Annotated[
        Optional[Any],
        deprecated(
            "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, "
            "although still supported. Use examples instead."
        ),
    ] = _Unset,
    openapi_examples: Annotated[
        Optional[Dict[str, Example]],
        Doc(
            
        ),
    ] = None,
    deprecated: Annotated[
        Optional[bool],
        Doc(
            
        ),
    ] = None,
    include_in_schema: Annotated[
        bool,
        Doc(
            
        ),
    ] = True,
    json_schema_extra: Annotated[
        Union[Dict[str, Any], None],
        Doc(
            
        ),
    ] = None,
    **extra: Annotated[
        Any,
        Doc(
            
        ),
        deprecated(
            
        ),
    ],
) -> Any:
    return params.File(
        default=default,
        default_factory=default_factory,
        media_type=media_type,
        alias=alias,
        alias_priority=alias_priority,
        validation_alias=validation_alias,
        serialization_alias=serialization_alias,
        title=title,
        description=description,
        gt=gt,
        ge=ge,
        lt=lt,
        le=le,
        min_length=min_length,
        max_length=max_length,
        pattern=pattern,
        regex=regex,
        discriminator=discriminator,
        strict=strict,
        multiple_of=multiple_of,
        allow_inf_nan=allow_inf_nan,
        max_digits=max_digits,
        decimal_places=decimal_places,
        example=example,
        examples=examples,
        openapi_examples=openapi_examples,
        deprecated=deprecated,
        include_in_schema=include_in_schema,
        json_schema_extra=json_schema_extra,
        **extra,
    )


def Depends(  
    dependency: Annotated[
        Optional[Callable[..., Any]],
        Doc(
            
        ),
    ] = None,
    *,
    use_cache: Annotated[
        bool,
        Doc(
            
        ),
    ] = True,
) -> Any:
    
    return params.Depends(dependency=dependency, use_cache=use_cache)


def Security(  
    dependency: Annotated[
        Optional[Callable[..., Any]],
        Doc(
            
        ),
    ] = None,
    *,
    scopes: Annotated[
        Optional[Sequence[str]],
        Doc(
            
        ),
    ] = None,
    use_cache: Annotated[
        bool,
        Doc(
            
        ),
    ] = True,
) -> Any:
    
    return params.Security(dependency=dependency, scopes=scopes, use_cache=use_cache)