Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 643 for tutorial005_py39 (0.09 sec)

  1. docs/en/docs/tutorial/path-params.md

    {* ../../docs_src/path_params/tutorial005_py39.py hl[17] *}
    
    #### Get the *enumeration value* { #get-the-enumeration-value }
    
    You can get the actual value (a `str` in this case) using `model_name.value`, or in general, `your_enum_member.value`:
    
    {* ../../docs_src/path_params/tutorial005_py39.py hl[20] *}
    
    /// tip
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 9.2K bytes
    - Viewed (0)
  2. docs/es/docs/tutorial/path-params.md

    {* ../../docs_src/path_params/tutorial005_py39.py hl[17] *}
    
    #### Obtener el valor de *enumeración* { #get-the-enumeration-value }
    
    Puedes obtener el valor actual (un `str` en este caso) usando `model_name.value`, o en general, `your_enum_member.value`:
    
    {* ../../docs_src/path_params/tutorial005_py39.py hl[20] *}
    
    /// tip | Consejo
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 9.8K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_python_types/test_tutorial005.py

    from docs_src.python_types.tutorial005_py39 import get_items
    
    
    def test_get_items():
        res = get_items(
            "item_a",
            "item_b",
            "item_c",
            "item_d",
            "item_e",
        )
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 271 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_custom_response/test_tutorial005.py

    from fastapi.testclient import TestClient
    
    from docs_src.custom_response.tutorial005_py39 import app
    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/")
        assert response.status_code == 200, response.text
        assert response.text == "Hello World"
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 985 bytes
    - Viewed (0)
  5. docs/de/docs/tutorial/query-params.md

    Aber wenn Sie wollen, dass ein Query-Parameter erforderlich ist, vergeben Sie einfach keinen Defaultwert:
    
    {* ../../docs_src/query_params/tutorial005_py39.py hl[6:7] *}
    
    Hier ist `needy` ein erforderlicher Query-Parameter vom Typ `str`.
    
    Wenn Sie in Ihrem Browser eine URL wie:
    
    ```
    http://127.0.0.1:8000/items/foo-item
    ```
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 5K bytes
    - Viewed (0)
  6. docs/ru/docs/python-types.md

    {* ../../docs_src/python_types/tutorial003_py39.py hl[1] *}
    
    Так как редактор кода знает типы переменных, вы получаете не только автозавершение, но и проверки ошибок:
    
    <img src="/img/python-types/image04.png">
    
    Теперь вы знаете, что нужно исправить — преобразовать `age` в строку с помощью `str(age)`:
    
    {* ../../docs_src/python_types/tutorial004_py39.py hl[2] *}
    
    ## Объявление типов { #declaring-types }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 24.4K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_extra_models/test_tutorial005.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial005_py39"),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.extra_models.{request.param}")
    
        client = TestClient(mod.app)
        return client
    
    
    def test_get_items(client: TestClient):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  8. pyproject.toml

    [tool.ruff.lint.per-file-ignores]
    "__init__.py" = ["F401"]
    "docs_src/dependencies/tutorial007_py39.py" = ["F821"]
    "docs_src/dependencies/tutorial008_py39.py" = ["F821"]
    "docs_src/dependencies/tutorial009_py39.py" = ["F821"]
    "docs_src/dependencies/tutorial010_py39.py" = ["F821"]
    "docs_src/custom_response/tutorial007_py39.py" = ["B007"]
    "docs_src/dataclasses/tutorial003_py39.py" = ["I001"]
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_body_multiple_params/test_tutorial005.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial005_py39"),
            pytest.param("tutorial005_py310", marks=needs_py310),
            pytest.param("tutorial005_an_py39"),
            pytest.param("tutorial005_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
    - 8.2K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_query_params/test_tutorial005.py

    from fastapi.testclient import TestClient
    
    from docs_src.query_params.tutorial005_py39 import app
    
    client = TestClient(app)
    
    
    def test_foo_needy_very():
        response = client.get("/items/foo?needy=very")
        assert response.status_code == 200
        assert response.json() == {"item_id": "foo", "needy": "very"}
    
    
    def test_foo_no_needy():
        response = client.get("/items/foo")
        assert response.status_code == 422
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 3.6K bytes
    - Viewed (0)
Back to top