Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1711 - 1720 of 1,916 for FastApi (0.2 sec)

  1. tests/test_tutorial/test_background_tasks/test_tutorial001.py

    import os
    from pathlib import Path
    
    from fastapi.testclient import TestClient
    
    from docs_src.background_tasks.tutorial001_py39 import app
    
    client = TestClient(app)
    
    
    def test():
        log = Path("log.txt")
        if log.is_file():
            os.remove(log)  # pragma: no cover
        response = client.post("/send-notification/******@****.***")
        assert response.status_code == 200, response.text
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 583 bytes
    - Viewed (0)
  2. docs/uk/docs/tutorial/cookie-params.md

    /// note | Технічні Деталі
    
    `Cookie` це "сестра" класів `Path` і `Query`. Вони наслідуються від одного батьківського класу `Param`.
    Але пам'ятайте, що коли ви імпортуєте `Query`, `Path`, `Cookie` та інше з `fastapi`, це фактично функції, що повертають спеціальні класи.
    
    ///
    
    /// info
    
    Для визначення cookies ви маєте використовувати `Cookie`, тому що в іншому випадку параметри будуть інтерпритовані, як параметри запиту.
    
    ///
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_websockets/test_tutorial003.py

    import importlib
    from types import ModuleType
    
    import pytest
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(
        name="mod",
        params=[
            pytest.param("tutorial003_py39"),
        ],
    )
    def get_mod(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.websockets.{request.param}")
    
        return mod
    
    
    @pytest.fixture(name="html")
    def get_html(mod: ModuleType):
        return mod.html
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  4. docs/ru/docs/tutorial/middleware.md

    # Middleware (Промежуточный слой) { #middleware }
    
    Вы можете добавить промежуточный слой (middleware) в **FastAPI** приложение.
    
    "Middleware" это функция, которая выполняется с каждым запросом до его обработки какой-либо конкретной *операцией пути*.
    А также с каждым ответом перед его возвращением.
    
    
    * Она принимает каждый поступающий **запрос**.
    * Может что-то сделать с этим **запросом** или выполнить любой нужный код.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  5. scripts/sponsors.py

        subprocess.run(
            ["git", "config", "user.email", "github-actions[bot]@users.noreply.github.com"],
            check=True,
        )
        branch_name = f"fastapi-people-sponsors-{secrets.token_hex(4)}"
        logging.info(f"Creating a new branch {branch_name}")
        subprocess.run(["git", "checkout", "-b", branch_name], check=True)
        logging.info("Adding updated file")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 12:34:01 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  6. docs/zh/docs/tutorial/body-fields.md

    ## 导入 `Field`
    
    首先,从 Pydantic 中导入 `Field`:
    
    {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[4] *}
    
    /// warning | 警告
    
    注意,与从 `fastapi` 导入 `Query`,`Path`、`Body` 不同,要直接从 `pydantic` 导入 `Field` 。
    
    ///
    
    ## 声明模型属性
    
    然后,使用 `Field` 定义模型的属性:
    
    {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[11:14] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_extra_models/test_tutorial003.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial003_py39"),
            pytest.param("tutorial003_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.extra_models.{request.param}")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial004.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial004_py39"),
            pytest.param("tutorial004_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(
            f"docs_src.path_operation_advanced_configuration.{request.param}"
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 5K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_query_params_str_validations/test_tutorial008.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial008_py39"),
            pytest.param("tutorial008_py310", marks=needs_py310),
            pytest.param("tutorial008_an_py39"),
            pytest.param("tutorial008_an_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_query_params_str_validations/test_tutorial015.py

    import importlib
    
    import pytest
    from dirty_equals import IsStr
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial015_an_py39"),
            pytest.param("tutorial015_an_py310", marks=[needs_py310]),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 5K bytes
    - Viewed (0)
Back to top