- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 30 for fixedquery (0.05 seconds)
-
tests/test_tutorial/test_query_params_str_validations/test_tutorial007.py
def test_query_params_str_validations_q_fixedquery(client: TestClient): response = client.get("/items/", params={"q": "fixedquery"}) assert response.status_code == 200 assert response.json() == { "items": [{"item_id": "Foo"}, {"item_id": "Bar"}], "q": "fixedquery", } def test_query_params_str_validations_q_fixedquery_too_short(client: TestClient):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 4.6K bytes - Click Count (0) -
docs/uk/docs/tutorial/query-params-str-validations.md
Цей конкретний шаблон регулярного виразу перевіряє, що отримане значення параметра: * `^`: починається з наступних символів, перед якими немає інших символів. * `fixedquery`: точно відповідає значенню `fixedquery`. * `$`: закінчується тут, після `fixedquery` немає жодних символів.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri May 30 14:17:24 GMT 2025 - 26.1K bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial004_py310.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 335 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial004_regex_an_py310.py
from typing import Annotated from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[ str | None, Query(min_length=3, max_length=50, regex="^fixedquery$") ] = None, ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 18 02:25:44 GMT 2024 - 366 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial004_an_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 381 bytes - Click Count (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial006.py
} def test_query_params_str_validations_q_fixedquery(client: TestClient): response = client.get("/items/", params={"q": "fixedquery"}) assert response.status_code == 200 assert response.json() == { "items": [{"item_id": "Foo"}, {"item_id": "Bar"}], "q": "fixedquery", } def test_query_params_str_validations_q_fixedquery_too_short(client: TestClient):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 4.4K bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial010_an_py310.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 622 bytes - Click Count (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial008.py
def test_query_params_str_validations_q_fixedquery(client: TestClient): response = client.get("/items/", params={"q": "fixedquery"}) assert response.status_code == 200 assert response.json() == { "items": [{"item_id": "Foo"}, {"item_id": "Bar"}], "q": "fixedquery", } def test_query_params_str_validations_q_fixedquery_too_short(client: TestClient):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 4.9K bytes - Click Count (0) -
docs/zh/docs/tutorial/query-params-str-validations.md
这个指定的正则表达式通过以下规则检查接收到的参数值: * `^`:以该符号之后的字符开头,符号之前没有字符。 * `fixedquery`: 值精确地等于 `fixedquery`。 * `$`: 到此结束,在 `fixedquery` 之后没有更多字符。 如果你对所有的这些**「正则表达式」**概念感到迷茫,请不要担心。对于许多人来说这都是一个困难的主题。你仍然可以在无需正则表达式的情况下做很多事情。 但是,一旦你需要用到并去学习它们时,请了解你已经可以在 **FastAPI** 中直接使用它们。 ## 默认值 你可以向 `Query` 的第一个参数传入 `None` 用作查询参数的默认值,以同样的方式你也可以传递其他默认值。 假设你想要声明查询参数 `q`,使其 `min_length` 为 `3`,并且默认值为 `fixedquery`:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Feb 15 16:23:59 GMT 2025 - 7.7K bytes - Click Count (0) -
docs/fr/docs/tutorial/query-params-str-validations.md
Cette expression régulière vérifie que la valeur passée comme paramètre : * `^` : commence avec les caractères qui suivent, avec aucun caractère avant ceux-là. * `fixedquery` : a pour valeur exacte `fixedquery`. * `$` : se termine directement ensuite, n'a pas d'autres caractères après `fixedquery`.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Nov 09 16:39:20 GMT 2024 - 9.5K bytes - Click Count (0)