- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 121 for tutorial001_03_py39 (0.11 sec)
-
docs/en/docs/how-to/authentication-error-status-code.md
For example, you can create a subclass of `HTTPBearer` that returns a `403 Forbidden` error instead of the default `401 Unauthorized` error: {* ../../docs_src/authentication_error_status_code/tutorial001_an_py39.py hl[9:13] *} /// tip Notice that the function returns the exception instance, it doesn't raise it. The raising is done in the rest of the internal code.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 24 19:03:06 UTC 2025 - 1.3K bytes - Viewed (0) -
docs/pt/docs/how-to/authentication-error-status-code.md
Por exemplo, você pode criar uma subclasse de `HTTPBearer` que retorne um erro `403 Forbidden` em vez do erro padrão `401 Unauthorized`: {* ../../docs_src/authentication_error_status_code/tutorial001_an_py39.py hl[9:13] *} /// tip | Dica Perceba que a função retorna a instância da exceção, ela não a lança. O lançamento é feito no restante do código interno.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 19:59:04 UTC 2025 - 1.3K bytes - Viewed (0) -
docs/ru/docs/tutorial/security/first-steps.md
Сначала просто воспользуемся кодом и посмотрим, как он работает, а затем вернемся и разберемся, что происходит. ## Создание `main.py` { #create-main-py } Скопируйте пример в файл `main.py`: {* ../../docs_src/security/tutorial001_an_py39.py *} ## Запуск { #run-it } /// info | Дополнительная информацияRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Sep 30 11:24:39 UTC 2025 - 14.2K bytes - Viewed (0) -
tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py
@pytest.fixture( name="client", params=[ pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), pytest.param("tutorial001_an_py39"), pytest.param("tutorial001_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.custom_request_and_route.{request.param}")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.3K bytes - Viewed (0) -
docs/de/docs/how-to/authentication-error-status-code.md
Sie können beispielsweise eine Unterklasse von `HTTPBearer` erstellen, die einen Fehler `403 Forbidden` zurückgibt, statt des Default-`401 Unauthorized`-Fehlers: {* ../../docs_src/authentication_error_status_code/tutorial001_an_py39.py hl[9:13] *} /// tip | Tipp Beachten Sie, dass die Funktion die Exception-Instanz zurückgibt; sie wirft sie nicht. Das Werfen erfolgt im restlichen internen Code.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 02 17:32:56 UTC 2025 - 1.4K bytes - Viewed (0) -
docs/ru/docs/how-to/authentication-error-status-code.md
Например, вы можете создать подкласс `HTTPBearer`, который будет возвращать ошибку `403 Forbidden` вместо стандартной `401 Unauthorized`: {* ../../docs_src/authentication_error_status_code/tutorial001_an_py39.py hl[9:13] *} /// tip | Совет Обратите внимание, что функция возвращает экземпляр исключения, не вызывает его. Выброс выполняется остальным внутренним кодом.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Thu Dec 11 21:25:03 UTC 2025 - 1.8K bytes - Viewed (0) -
docs/de/docs/tutorial/security/first-steps.md
## `main.py` erstellen { #create-main-py } Kopieren Sie das Beispiel in eine Datei `main.py`: {* ../../docs_src/security/tutorial001_an_py39.py *} ## Ausführen { #run-it } /// info | InfoRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Sep 20 15:10:09 UTC 2025 - 9.9K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial001.py
import importlib import pytest from fastapi.testclient import TestClient @pytest.fixture( name="client", params=[ pytest.param("tutorial001_py39"), pytest.param("tutorial001_an_py39"), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.security.{request.param}") client = TestClient(mod.app) return client
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 2.2K bytes - Viewed (0) -
docs/de/docs/tutorial/response-model.md
### Eine Unterklasse von Response annotieren { #annotate-a-response-subclass } Sie können auch eine Unterklasse von `Response` in der Typannotation verwenden. {* ../../docs_src/response_model/tutorial003_03_py39.py hl[8:9] *} Das wird ebenfalls funktionieren, weil `RedirectResponse` eine Unterklasse von `Response` ist, und FastAPI sich um diesen einfachen Anwendungsfall automatisch kümmert.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 24 10:28:19 UTC 2025 - 17.5K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial003_02.py
from fastapi.testclient import TestClient from docs_src.response_model.tutorial003_02_py39 import app client = TestClient(app) def test_get_portal(): response = client.get("/portal") assert response.status_code == 200, response.text assert response.json() == {"message": "Here's your interdimensional portal."} def test_get_redirect(): response = client.get("/portal", params={"teleport": True}, follow_redirects=False)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.4K bytes - Viewed (0)