Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 128 for tutorial001_01_py39 (0.12 sec)

  1. 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)
  2. docs/pt/docs/tutorial/security/first-steps.md

    Vamos primeiro usar o código e ver como funciona, e depois voltaremos para entender o que está acontecendo.
    
    ## Crie um `main.py` { #create-main-py }
    
    Copie o exemplo em um arquivo `main.py`:
    
    {* ../../docs_src/security/tutorial001_an_py39.py *}
    
    ## Execute-o { #run-it }
    
    /// info | Informação
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Nov 12 16:23:57 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  3. docs/es/docs/tutorial/security/first-steps.md

    Primero solo usemos el código y veamos cómo funciona, y luego volveremos para entender qué está sucediendo.
    
    ## Crea `main.py` { #create-main-py }
    
    Copia el ejemplo en un archivo `main.py`:
    
    {* ../../docs_src/security/tutorial001_an_py39.py *}
    
    ## Ejecútalo { #run-it }
    
    /// info | Información
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 16:33:45 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  4. docs/es/docs/how-to/authentication-error-status-code.md

    Por ejemplo, puedes crear una subclase de `HTTPBearer` que devuelva un error `403 Forbidden` en lugar del `401 Unauthorized` por defecto:
    
    {* ../../docs_src/authentication_error_status_code/tutorial001_an_py39.py hl[9:13] *}
    
    /// tip | Consejo
    
    Ten en cuenta que la función devuelve la instance de la excepción, no la lanza. El lanzamiento se hace en el resto del código interno.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 16:16:35 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_response_model/test_tutorial003_05.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial003_05_py39"),
            pytest.param("tutorial003_05_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.response_model.{request.param}")
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_request_files/test_tutorial001_02.py

    import pytest
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial001_02_py39"),
            pytest.param("tutorial001_02_py310", marks=needs_py310),
            pytest.param("tutorial001_02_an_py39"),
            pytest.param("tutorial001_02_an_py310", marks=needs_py310),
        ],
    )
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_cookie_params/test_tutorial001.py

    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="mod",
        params=[
            "tutorial001_py39",
            pytest.param("tutorial001_py310", marks=needs_py310),
            "tutorial001_an_py39",
            pytest.param("tutorial001_an_py310", marks=needs_py310),
        ],
    )
    def get_mod(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.cookie_params.{request.param}")
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 4K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_header_params/test_tutorial001.py

    from ...utils import needs_py310
    
    
    @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.header_params.{request.param}")
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  9. docs/uk/docs/tutorial/request-form-models.md

    ## Використання Pydantic-моделей для форм
    
    Вам просто потрібно оголосити **Pydantic-модель** з полями, які Ви хочете отримати як **поля форми**, а потім оголосити параметр як `Form`:
    
    {* ../../docs_src/request_form_models/tutorial001_an_py39.py hl[9:11,15] *}
    
    **FastAPI**  **витягне** дані для **кожного поля** з **формових даних** у запиті та надасть вам Pydantic-модель, яку Ви визначили.
    
    ## Перевірка документації
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Feb 20 14:16:09 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_additional_status_codes/test_tutorial001.py

    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            "tutorial001_py39",
            pytest.param("tutorial001_py310", marks=needs_py310),
            "tutorial001_an_py39",
            pytest.param("tutorial001_an_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.additional_status_codes.{request.param}")
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 993 bytes
    - Viewed (0)
Back to top