- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for annotation (0.28 sec)
-
fastapi/params.py
self.deprecated = deprecated else: kwargs["deprecated"] = deprecated if PYDANTIC_V2: kwargs.update( { "annotation": annotation, "alias_priority": alias_priority, "validation_alias": validation_alias, "serialization_alias": serialization_alias, "strict": strict,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 27.5K bytes - Viewed (1) -
fastapi/utils.py
f"check that {type_} is a valid Pydantic field type. " "If you are using a return type annotation that is not a valid Pydantic " "field (e.g. Union[Response, dict, None]) you can disable generating the " "response model from the type annotation with the path operation decorator " "parameter response_model=None. Read more: "
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 7.8K bytes - Viewed (0) -
fastapi/dependencies/utils.py
field_info = params.Path(annotation=use_annotation) elif is_uploadfile_or_nonable_uploadfile_annotation( type_annotation ) or is_uploadfile_sequence_annotation(type_annotation): field_info = params.File(annotation=use_annotation, default=default_value) elif not field_annotation_is_scalar(annotation=type_annotation):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:52:56 GMT 2024 - 29.5K bytes - Viewed (0) -
tests/test_ambiguous_params.py
async def get2(foo: Annotated[int, Depends(dep)] = Depends(dep)): pass # pragma: nocover with pytest.raises( AssertionError, match=( "Cannot specify a FastAPI annotation in `Annotated` and `Depends` as a" " default value together for 'foo'" ), ): @app.get("/") async def get3(foo: Annotated[int, Query(min_length=1)] = Depends(dep)):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Dec 12 00:22:47 GMT 2023 - 2.1K bytes - Viewed (0) -
fastapi/_compat.py
elif not field_annotation_is_scalar(arg): return False return at_least_one_scalar_sequence return field_annotation_is_sequence(annotation) and all( field_annotation_is_scalar(sub_annotation) for sub_annotation in get_args(annotation) ) def is_bytes_or_nonable_bytes_annotation(annotation: Any) -> bool: if lenient_issubclass(annotation, bytes): return True
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 22.6K bytes - Viewed (0) -
tests/test_security_oauth2.py
} } ) class User(BaseModel): username: str # Here we use string annotations to test them def get_current_user(oauth_header: "str" = Security(reusable_oauth2)): user = User(username=oauth_header) return user @app.post("/login") # Here we use string annotations to test them def login(form_data: "OAuth2PasswordRequestFormStrict" = Depends()): return form_data
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 10.7K bytes - Viewed (0) -
fastapi/routing.py
self.endpoint = endpoint if isinstance(response_model, DefaultPlaceholder): return_annotation = get_typed_return_annotation(endpoint) if lenient_issubclass(return_annotation, Response): response_model = None else: response_model = return_annotation self.response_model = response_model self.summary = summary
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 170.1K bytes - Viewed (0) -
fastapi/openapi/models.py
contentSchema: Optional["SchemaOrBool"] = None # Ref: JSON Schema Validation 2020-12: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-a-vocabulary-for-basic-meta # A Vocabulary for Basic Meta-Data Annotations title: Optional[str] = None description: Optional[str] = None default: Optional[Any] = None deprecated: Optional[bool] = None readOnly: Optional[bool] = None
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 22:49:33 GMT 2024 - 15K bytes - Viewed (1)