- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 66 for min (0.23 sec)
-
docs_src/query_params_str_validations/tutorial010_py310.py
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, ), ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 542 bytes - Viewed (0) -
docs/en/docs/tutorial/query-params-str-validations.md
``` But we are now declaring it with `Query`, for example like: === "Annotated" ```Python q: Annotated[Union[str, None], Query(min_length=3)] = None ``` === "non-Annotated" ```Python q: Union[str, None] = Query(default=None, min_length=3) ``` So, when you need to declare a value as required while using `Query`, you can simply not declare a default value: === "Python 3.9+"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 25.7K bytes - Viewed (0) -
tests/test_path.py
} ] } ) def test_path_param_min_maxlength_foo(): response = client.get("/path/param-min_maxlength/foo") assert response.status_code == 200 assert response.json() == "foo" def test_path_param_min_maxlength_foobar(): response = client.get("/path/param-min_maxlength/foobar") assert response.status_code == 422 assert response.json() == IsDict(
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 34.4K bytes - Viewed (0) -
tests/test_ambiguous_params.py
"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)): pass # pragma: nocover client = TestClient(app) response = client.get("/multi-query", params={"foo": "5"}) assert response.status_code == 200
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) -
docs_src/query_params_str_validations/tutorial006b_an_py39.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 300 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial006_an.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 304 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial006_an_py39.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 294 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial006b_an.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 310 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial006d_an_py39.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 335 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial006c_an_py310.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 307 bytes - Viewed (0)