Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 616 for tutorial012_py39 (0.08 sec)

  1. docs/es/docs/advanced/events.md

    ### Evento `shutdown` { #shutdown-event }
    
    Para añadir una función que debería ejecutarse cuando la aplicación se esté cerrando, declárala con el evento `"shutdown"`:
    
    {* ../../docs_src/events/tutorial002_py39.py hl[6] *}
    
    Aquí, la función manejadora del evento `shutdown` escribirá una línea de texto `"Application shutdown"` a un archivo `log.txt`.
    
    /// info | Información
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  2. docs/ru/docs/advanced/testing-events.md

    Если вам нужно, чтобы `lifespan` выполнялся в ваших тестах, вы можете использовать `TestClient` вместе с оператором `with`:
    
    {* ../../docs_src/app_testing/tutorial004_py39.py hl[9:15,18,27:28,30:32,41:43] *}
    
    
    Вы можете узнать больше подробностей в статье [Запуск lifespan в тестах на официальном сайте документации Starlette.](https://www.starlette.dev/lifespan/#running-lifespan-in-tests)
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 902 bytes
    - Viewed (0)
  3. docs/es/docs/advanced/testing-events.md

    {* ../../docs_src/app_testing/tutorial004_py39.py hl[9:15,18,27:28,30:32,41:43] *}
    
    
    Puedes leer más detalles sobre ["Ejecutar lifespan en tests en el sitio oficial de documentación de Starlette."](https://www.starlette.dev/lifespan/#running-lifespan-in-tests)
    
    Para los eventos obsoletos `startup` y `shutdown`, puedes usar el `TestClient` así:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 632 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_response_status_code/test_tutorial001_tutorial002.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial001_py39"),
            pytest.param("tutorial002_py39"),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.response_status_code.{request.param}")
    
        client = TestClient(mod.app)
        return client
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_first_steps/test_tutorial001_tutorial002_tutorial003.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(
        name="client",
        params=[
            "tutorial001_py39",
            "tutorial003_py39",
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.first_steps.{request.param}")
        client = TestClient(mod.app)
        return client
    
    
    @pytest.mark.parametrize(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  6. docs/ru/docs/how-to/custom-docs-ui-assets.md

    ```
    
    ### Предоставьте доступ к статическим файлам { #serve-the-static-files }
    
    * Импортируйте `StaticFiles`.
    * Смонтируйте экземпляр `StaticFiles()` в определённый путь.
    
    {* ../../docs_src/custom_docs_ui/tutorial002_py39.py hl[7,11] *}
    
    ### Протестируйте статические файлы { #test-the-static-files }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/path-operation-advanced-configuration.md

    You should do it after adding all your *path operations*.
    
    {* ../../docs_src/path_operation_advanced_configuration/tutorial002_py39.py hl[2, 12:21, 24] *}
    
    /// tip
    
    If you manually call `app.openapi()`, you should update the `operationId`s before that.
    
    ///
    
    /// warning
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_custom_response/test_tutorial001.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial001_py39"),
            pytest.param("tutorial010_py39"),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.custom_response.{request.param}")
        client = TestClient(mod.app)
        return client
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/testing-events.md

    {* ../../docs_src/app_testing/tutorial004_py39.py hl[9:15,18,27:28,30:32,41:43] *}
    
    
    You can read more details about the ["Running lifespan in tests in the official Starlette documentation site."](https://www.starlette.dev/lifespan/#running-lifespan-in-tests)
    
    For the deprecated `startup` and `shutdown` events, you can use the `TestClient` as follows:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 626 bytes
    - Viewed (0)
  10. docs_src/response_cookies/tutorial002_py39.py

    Sebastián Ramírez <******@****.***> 1766004103 -0800
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 272 bytes
    - Viewed (0)
Back to top