Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 179 for tutorial002_an_py310 (0.22 sec)

  1. docs/en/docs/tutorial/security/oauth2-jwt.md

    And another one to authenticate and return a user.
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="8  49  56-57  60-61  70-76"
    {!> ../../docs_src/security/tutorial004_an_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="8  49  56-57  60-61  70-76"
    {!> ../../docs_src/security/tutorial004_an_py39.py!}
    ```
    
    ////
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 26 11:45:10 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_header_params/test_tutorial003_an_py310.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.header_params.tutorial003_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/dependencies/index.md

    ///
    
    ### Import `Depends`
    
    {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[3] *}
    
    ### Declare the dependency, in the "dependant"
    
    The same way you use `Body`, `Query`, etc. with your *path operation function* parameters, use `Depends` with a new parameter:
    
    {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[13,18] *}
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Oct 28 11:18:17 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_body_multiple_params/test_tutorial001_an_py310.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_multiple_params.tutorial001_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_post_body_q_bar_content(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  5. 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 Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 16:12:23 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_body_multiple_params/test_tutorial003_an_py310.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_multiple_params.tutorial003_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_post_body_valid(client: TestClient):
        response = client.put(
            "/items/5",
            json={
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_header_params/test_tutorial001_an_py310.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.header_params.tutorial001_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4K bytes
    - Viewed (0)
  8. docs/pt/docs/tutorial/dependencies/index.md

    Primeiro vamos focar na dependência.
    
    Ela é apenas uma função que pode receber os mesmos parâmetros de uma *função de operação de rota*:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="8-9"
    {!> ../../docs_src/dependencies/tutorial001_an_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="8-11"
    {!> ../../docs_src/dependencies/tutorial001_an_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  9. docs/pt/docs/tutorial/cookie-param-models.md

    Declare o parâmetro de **cookie** que você precisa em um **modelo Pydantic**, e depois declare o parâmetro como um `Cookie`:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="9-12  16"
    {!> ../../docs_src/cookie_param_models/tutorial001_an_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="9-12  16"
    {!> ../../docs_src/cookie_param_models/tutorial001_an_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Oct 07 20:18:07 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_dependencies/test_tutorial004_an_py310.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.dependencies.tutorial004_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    @pytest.mark.parametrize(
        "path,expected_status,expected_response",
        [
            (
                "/items",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 5.6K bytes
    - Viewed (0)
Back to top