- Sort Score
- Num 10 results
- Language All
Results 321 - 330 of 515 for tutorial006c_py39 (0.17 seconds)
-
tests/test_tutorial/test_testing/test_tutorial001.py
from docs_src.app_testing.tutorial001_py39 import client, test_read_main def test_main(): test_read_main() def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/": { "get": {
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 826 bytes - Click Count (0) -
tests/test_tutorial/test_python_types/test_tutorial008b.py
import importlib from types import ModuleType from unittest.mock import patch import pytest from ...utils import needs_py310 @pytest.fixture( name="module", params=[ pytest.param("tutorial008b_py39"), pytest.param("tutorial008b_py310", marks=needs_py310), ], ) def get_module(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.python_types.{request.param}") return mod
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 637 bytes - Click Count (0) -
tests/test_tutorial/test_wsgi/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.wsgi.tutorial001_py39 import app client = TestClient(app) def test_flask(): response = client.get("/v1/") assert response.status_code == 200, response.text assert response.text == "Hello, World from Flask!" def test_app(): response = client.get("/v2") assert response.status_code == 200, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 441 bytes - Click Count (1) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial006.py
import pytest from fastapi.testclient import TestClient from docs_src.path_operation_configuration.tutorial006_py39 import app client = TestClient(app) @pytest.mark.parametrize( "path,expected_status,expected_response", [ ("/items/", 200, [{"name": "Foo", "price": 42}]), ("/users/", 200, [{"username": "johndoe"}]), ("/elements/", 200, [{"item_id": "Foo"}]), ], )
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 2.4K bytes - Click Count (0) -
tests/test_tutorial/test_custom_response/test_tutorial001b.py
from fastapi.testclient import TestClient from docs_src.custom_response.tutorial001b_py39 import app client = TestClient(app) def test_get_custom_response(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"item_id": "Foo"}] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1K bytes - Click Count (0) -
tests/test_tutorial/test_testing/test_tutorial004.py
from docs_src.app_testing.tutorial004_py39 import test_read_items def test_main():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 107 bytes - Click Count (0) -
docs/pt/docs/tutorial/first-steps.md
{* ../../docs_src/first_steps/tutorial001_py39.py hl[7] *} Esta é uma função Python. Ela será chamada pelo **FastAPI** sempre que receber uma requisição para a URL "`/`" usando uma operação `GET`. Neste caso, é uma função `async`. --- Você também pode defini-la como uma função normal em vez de `async def`: {* ../../docs_src/first_steps/tutorial003_py39.py hl[7] *} /// note | NotaCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 13.6K bytes - Click Count (0) -
docs/es/docs/tutorial/first-steps.md
{* ../../docs_src/first_steps/tutorial001_py39.py hl[7] *} Esta es una función de Python. Será llamada por **FastAPI** cuando reciba un request en la URL "`/`" usando una operación `GET`. En este caso, es una función `async`. --- También podrías definirla como una función normal en lugar de `async def`: {* ../../docs_src/first_steps/tutorial003_py39.py hl[7] *} /// note | NotaCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 13.3K bytes - Click Count (0) -
tests/test_tutorial/test_testing/test_tutorial002.py
from docs_src.app_testing.tutorial002_py39 import test_read_main, test_websocket def test_main(): test_read_main() def test_ws():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 159 bytes - Click Count (0) -
docs/de/docs/tutorial/background-tasks.md
{* ../../docs_src/background_tasks/tutorial001_py39.py hl[6:9] *} ## Den Hintergrundtask hinzufügen { #add-the-background-task } Übergeben Sie innerhalb Ihrer *Pfadoperation-Funktion* Ihre Taskfunktion mit der Methode `.add_task()` an das *Hintergrundtasks*-Objekt: {* ../../docs_src/background_tasks/tutorial001_py39.py hl[14] *} `.add_task()` erhält als Argumente:Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 5.8K bytes - Click Count (0)