- Sort Score
- Result 10 results
- Languages All
Results 231 - 240 of 316 for tutorial008_py310 (0.07 sec)
-
docs/uk/docs/tutorial/query-params-str-validations.md
# Query параметри та валідація рядків **FastAPI** дозволяє оголошувати додаткову інформацію та виконувати валідацію для Ваших параметрів. Розглянемо цей додаток як приклад: {* ../../docs_src/query_params_str_validations/tutorial001_py310.py hl[7] *} Query параметр `q` має тип `str | None`, що означає, що він може бути як `str`, так і `None`. За замовчуванням він має значення `None`, тому FastAPI розуміє, що цей параметр не є обов'язковим. /// note | ПриміткаRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri May 30 14:17:24 UTC 2025 - 26.1K bytes - Viewed (0) -
tests/test_tutorial/test_query_param_models/test_tutorial002.py
from inline_snapshot import snapshot from tests.utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=[needs_py310]), pytest.param("tutorial002_an_py39"), pytest.param("tutorial002_an_py310", marks=[needs_py310]), ], ) def get_client(request: pytest.FixtureRequest):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 8K bytes - Viewed (0) -
docs/zh/docs/tutorial/encoder.md
同样,这个数据库也不会接收Pydantic模型(带有属性的对象),而只接收`dict`。 对此你可以使用`jsonable_encoder`。 它接收一个对象,比如Pydantic模型,并会返回一个JSON兼容的版本: {* ../../docs_src/encoder/tutorial001_py310.py hl[4,21] *} 在这个例子中,它将Pydantic模型转换为`dict`,并将`datetime`转换为`str`。 调用它的结果后就可以使用Python标准编码中的<a href="https://docs.python.org/3/library/json.html#json.dumps" class="external-link" target="_blank">`json.dumps()`</a>。Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 1.6K bytes - Viewed (0) -
tests/test_tutorial/test_body/test_tutorial004.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial004_py39"), pytest.param("tutorial004_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.body.{request.param}") client = TestClient(mod.app) return client
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 6K bytes - Viewed (0) -
tests/test_tutorial/test_encoder/test_tutorial001.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="mod", params=[ pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) def get_module(request: pytest.FixtureRequest): module = importlib.import_module(f"docs_src.encoder.{request.param}") return module @pytest.fixture(name="client")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 6.7K bytes - Viewed (0) -
docs/ru/docs/advanced/response-directly.md
В таких случаях вы можете использовать `jsonable_encoder` для преобразования данных перед передачей их в ответ: {* ../../docs_src/response_directly/tutorial001_py310.py hl[5:6,20:21] *} /// note | Технические детали Вы также можете использовать `from starlette.responses import JSONResponse`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 5.1K bytes - Viewed (0) -
tests/test_tutorial/test_body_nested_models/test_tutorial006.py
from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial006_py39"), pytest.param("tutorial006_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.body_nested_models.{request.param}") client = TestClient(mod.app) return client
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 8.7K bytes - Viewed (0) -
tests/test_tutorial/test_query_params/test_tutorial002.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.query_params.{request.param}") client = TestClient(mod.app) return client
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 4.2K bytes - Viewed (0) -
docs/uk/docs/python-types.md
```Python hl_lines="1 4" {!> ../../docs_src/python_types/tutorial008b.py!} ``` //// //// tab | Python 3.10 і вище ```Python hl_lines="1" {!> ../../docs_src/python_types/tutorial008b_py310.py!} ``` //// В обох випадках це означає, що `item` може бути `int` або `str`. #### Possibly `None` (Optional)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 19.4K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial002.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), pytest.param("tutorial002_an_py39"), pytest.param("tutorial002_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 2.2K bytes - Viewed (0)