- Sort Score
- Result 10 results
- Languages All
Results 791 - 800 of 924 for docs_src (0.03 sec)
-
docs/de/docs/how-to/conditional-openapi.md
Sie können problemlos dieselben Pydantic-Einstellungen verwenden, um Ihre generierte OpenAPI und die Dokumentationsoberflächen zu konfigurieren. Zum Beispiel: {* ../../docs_src/conditional_openapi/tutorial001_py39.py hl[6,11] *} Hier deklarieren wir die Einstellung `openapi_url` mit dem gleichen Defaultwert `"/openapi.json"`. Und dann verwenden wir es beim Erstellen der `FastAPI`-App.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3K bytes - Viewed (0) -
docs/es/docs/tutorial/debugging.md
Puedes conectar el depurador en tu editor, por ejemplo con Visual Studio Code o PyCharm. ## Llama a `uvicorn` { #call-uvicorn } En tu aplicación de FastAPI, importa y ejecuta `uvicorn` directamente: {* ../../docs_src/debugging/tutorial001_py39.py hl[1,15] *} ### Acerca de `__name__ == "__main__"` { #about-name-main } El objetivo principal de `__name__ == "__main__"` es tener algo de código que se ejecute cuando tu archivo es llamado con:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 2.6K bytes - Viewed (0) -
tests/test_tutorial/test_path_params_numeric_validations/test_tutorial006.py
params=[ pytest.param("tutorial006_py39"), pytest.param("tutorial006_an_py39"), ], ) 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/0?q=&size=0.1",Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 7.3K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial001.py
@pytest.fixture( name="client", params=[ "tutorial001_py39", "tutorial001_an_py39", ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.request_files.{request.param}") client = TestClient(mod.app) return client def test_post_form_no_body(client: TestClient): response = client.post("/files/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 7.1K bytes - Viewed (0) -
tests/test_tutorial/test_handling_errors/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.handling_errors.tutorial001_py39 import app client = TestClient(app) def test_get_item(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"item": "The Foo Wrestlers"} def test_get_item_not_found(): response = client.get("/items/bar") assert response.status_code == 404, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.2K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial002.py
pytest.param("tutorial002_an_py39"), pytest.param("tutorial002_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.security.{request.param}") client = TestClient(mod.app) return client def test_no_token(client: TestClient): response = client.get("/users/me") assert response.status_code == 401, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 2.2K bytes - Viewed (0) -
docs/en/docs/advanced/additional-status-codes.md
To achieve that, import `JSONResponse`, and return your content there directly, setting the `status_code` that you want: {* ../../docs_src/additional_status_codes/tutorial001_an_py310.py hl[4,25] *} /// warning When you return a `Response` directly, like in the example above, it will be returned directly. It won't be serialized with a model, etc.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 2K bytes - Viewed (0) -
docs/ru/docs/advanced/testing-dependencies.md
Тогда **FastAPI** будет вызывать это переопределение вместо исходной зависимости. {* ../../docs_src/dependency_testing/tutorial001_an_py310.py hl[26:27,30] *} /// tip | Совет Вы можете задать переопределение для зависимости, используемой в любом месте вашего приложения **FastAPI**.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Sep 30 11:37:11 UTC 2025 - 4.3K bytes - Viewed (0) -
docs/ru/docs/advanced/using-request-directly.md
Представим, что вы хотите получить IP-адрес/хост клиента внутри вашей *функции-обработчика пути*. Для этого нужно обратиться к запросу напрямую. {* ../../docs_src/using_request_directly/tutorial001_py39.py hl[1,7:8] *} Если объявить параметр *функции-обработчика пути* с типом `Request`, **FastAPI** поймёт, что нужно передать объект `Request` в этот параметр. /// tip | СоветRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.8K bytes - Viewed (0) -
tests/test_tutorial/test_generate_clients/test_tutorial003.py
from fastapi.testclient import TestClient from docs_src.generate_clients.tutorial003_py39 import app client = TestClient(app) def test_post_items(): response = client.post("/items/", json={"name": "Foo", "price": 5}) assert response.status_code == 200, response.text assert response.json() == {"message": "Item received"} def test_post_users(): response = client.post(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 7.1K bytes - Viewed (0)