- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 36 for always (0.22 sec)
-
fastapi/utils.py
f, cloned_types=cloned_types ) new_field = create_response_field(name=field.name, type_=use_type) new_field.has_alias = field.has_alias # type: ignore[attr-defined] new_field.alias = field.alias # type: ignore[misc] new_field.class_validators = field.class_validators # type: ignore[attr-defined] new_field.default = field.default # type: ignore[misc]
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 7.8K bytes - Viewed (0) -
fastapi/param_functions.py
``` """ 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,
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 62.5K bytes - Viewed (0) -
fastapi/dependencies/utils.py
use_annotation, field_info, param_name, ) if not field_info.alias and getattr(field_info, "convert_underscores", None): alias = param_name.replace("_", "-") else: alias = field_info.alias or param_name field_info.alias = alias field = create_response_field( name=param_name, type_=use_annotation_from_field_info,
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 02 02:52:56 GMT 2024 - 29.5K bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial001_an_py39.py
from fastapi import FastAPI, Path, Query app = FastAPI() @app.get("/items/{item_id}") async def read_items( item_id: Annotated[int, Path(title="The ID of the item to get")], q: Annotated[Union[str, None], Query(alias="item-query")] = None, ): results = {"item_id": item_id} if q: results.update({"q": q})
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 388 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial010_py310.py
from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: str | None = Query( default=None, alias="item-query", title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, max_length=50, pattern="^fixedquery$", deprecated=True, ), ):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 542 bytes - Viewed (0) -
tests/test_jsonable_encoder.py
model = ModelWithConfig(role=RoleEnum.admin) assert jsonable_encoder(model) == {"role": "admin"} def test_encode_model_with_alias_raises(): with pytest.raises(ValidationError): ModelWithAlias(foo="Bar") def test_encode_model_with_alias(): model = ModelWithAlias(Foo="Bar") assert jsonable_encoder(model) == {"Foo": "Bar"} def test_encode_model_with_default():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 9K bytes - Viewed (0) -
fastapi/security/api_key.py
This is useful when you want to have optional authentication. It is also useful when you want to have authentication that can be provided in one of multiple optional ways (for example, in a query parameter or in an HTTP Bearer token). """ ), ] = True, ): self.model: APIKey = APIKey(
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 23 22:29:18 GMT 2024 - 9.1K bytes - Viewed (0) -
fastapi/openapi/utils.py
operation_security = [] for security_requirement in flat_dependant.security_requirements: security_definition = jsonable_encoder( security_requirement.security_scheme.model, by_alias=True, exclude_none=True, ) security_name = security_requirement.security_scheme.scheme_name security_definitions[security_name] = security_definition
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 21.8K bytes - Viewed (0) -
fastapi/applications.py
the client doesn't have to provide it. But when using `Item` for output, for a response body, `tags` is always available because it has a default value, even if it's just an empty list. So, the client should be able to always expect it. In this case, there would be two different schemas, one for input and another one for output.
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 172.2K bytes - Viewed (0) -
tests/test_generate_unique_id_function.py
@app.post("/third") def post_third(item1: Item): return item1 # pragma: nocover client = TestClient(app) with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") client.get("/openapi.json") assert len(w) >= 2 duplicate_warnings = [ warning for warning in w if issubclass(warning.category, UserWarning) ]
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Jan 13 15:10:26 GMT 2024 - 66.7K bytes - Viewed (0)