- Sort Score
- Result 10 results
- Languages All
Results 731 - 740 of 924 for docs_src (0.03 sec)
-
docs/pt/docs/advanced/response-change-status-code.md
Você pode declarar um parâmetro do tipo `Response` em sua *função de operação de rota* (assim como você pode fazer para cookies e headers). E então você pode definir o `status_code` neste objeto de retorno temporal. {* ../../docs_src/response_change_status_code/tutorial001_py39.py hl[1,9,12] *} E então você pode retornar qualquer objeto que você precise, como você faria normalmente (um `dict`, um modelo de banco de dados, etc.).Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.7K bytes - Viewed (0) -
docs/en/docs/tutorial/encoder.md
You can use `jsonable_encoder` for that. It receives an object, like a Pydantic model, and returns a JSON compatible version: {* ../../docs_src/encoder/tutorial001_py310.py hl[4,21] *} In this example, it would convert the Pydantic model to a `dict`, and the `datetime` to a `str`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 1.7K bytes - Viewed (0) -
tests/test_tutorial/test_path_params_numeric_validations/test_tutorial001.py
pytest.param("tutorial001_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest) -> TestClient: mod = importlib.import_module( f"docs_src.path_params_numeric_validations.{request.param}" ) return TestClient(mod.app) @pytest.mark.parametrize( "path,expected_response", [ ("/items/42", {"item_id": 42}),
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 5.6K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial003_01.py
params=[ pytest.param("tutorial003_01_py39"), pytest.param("tutorial003_01_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.response_model.{request.param}") client = TestClient(mod.app) return client def test_post_user(client: TestClient): response = client.post( "/user/", json={Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 5.9K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial007.py
@pytest.fixture( name="client", params=[ pytest.param("tutorial007_py39"), pytest.param("tutorial007_an_py39"), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.security.{request.param}") return TestClient(mod.app) def test_security_http_basic(client: TestClient): response = client.get("/users/me", auth=("stanleyjobson", "swordfish"))
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 3.2K bytes - Viewed (0) -
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001.py
pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest) -> TestClient: mod = importlib.import_module(f"docs_src.separate_openapi_schemas.{request.param}") client = TestClient(mod.app) return client def test_create_item(client: TestClient) -> None: response = client.post("/items/", json={"name": "Foo"})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 5K bytes - Viewed (0) -
docs/ru/docs/tutorial/security/oauth2-jwt.md
Если токен недействителен, то сразу же верните HTTP-ошибку. {* ../../docs_src/security/tutorial004_an_py310.py hl[90:107] *} ## Обновление *операции пути* `/token` { #update-the-token-path-operation } Создайте `timedelta` со временем истечения срока действия токена. Создайте реальный токен доступа JWT и верните его {* ../../docs_src/security/tutorial004_an_py310.py hl[118:133] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Sep 30 11:24:39 UTC 2025 - 19.1K bytes - Viewed (0) -
docs/pt/docs/tutorial/dependencies/index.md
/// ### Importando `Depends` { #import-depends } {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[3] *} ### Declarando a dependência, no "dependente" { #declare-the-dependency-in-the-dependant } Da mesma forma que você utiliza `Body`, `Query`, etc. Como parâmetros de sua *função de operação de rota*, utilize `Depends` com um novo parâmetro: {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[13,18] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Nov 12 16:23:57 UTC 2025 - 10.7K bytes - Viewed (0) -
docs/en/docs/advanced/behind-a-proxy.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 16.4K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial001.py
params=[ pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.schema_extra_example.{request.param}") client = TestClient(mod.app) return client def test_post_body_example(client: TestClient): response = client.put( "/items/5", json={Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 4.8K bytes - Viewed (0)