Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 23 for tutorial002_pv1 (0.17 sec)

  1. docs_src/schema_extra_example/tutorial001_pv1.py

    Sebastián Ramírez <******@****.***> 1688749933 +0200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 669 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_settings/test_tutorial001_pv1.py

    from pytest import MonkeyPatch
    
    from ...utils import needs_pydanticv1
    
    
    @needs_pydanticv1
    def test_settings(monkeypatch: MonkeyPatch):
        monkeypatch.setenv("ADMIN_EMAIL", "******@****.***")
        from docs_src.settings.tutorial001_pv1 import app
    
        client = TestClient(app)
        response = client.get("/info")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "app_name": "Awesome API",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 556 bytes
    - Viewed (0)
  3. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial007_pv1.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_pydanticv1
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.path_operation_advanced_configuration.tutorial007_pv1 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_pydanticv1
    def test_post(client: TestClient):
        yaml_data = """
            name: Deadpoolio
            tags:
            - x-force
            - x-men
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  4. docs/de/docs/advanced/path-operation-advanced-configuration.md

    {!> ../../docs_src/path_operation_advanced_configuration/tutorial007.py!}
    ```
    
    ////
    
    //// tab | Pydantic v1
    
    ```Python hl_lines="17-22  24"
    {!> ../../docs_src/path_operation_advanced_configuration/tutorial007_pv1.py!}
    ```
    
    ////
    
    /// info
    
    In Pydantic Version 1 hieß die Methode zum Abrufen des JSON-Schemas für ein Modell `Item.schema()`, in Pydantic Version 2 heißt die Methode `Item.model_json_schema()`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_schema_extra_example/test_tutorial001_pv1.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_pydanticv1
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.schema_extra_example.tutorial001_pv1 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_pydanticv1
    def test_post_body_example(client: TestClient):
        response = client.put(
            "/items/5",
            json={
                "name": "Foo",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/path-operation-advanced-configuration.md

    {!> ../../docs_src/path_operation_advanced_configuration/tutorial007.py!}
    ```
    
    ////
    
    //// tab | Pydantic v1
    
    ```Python hl_lines="17-22  24"
    {!> ../../docs_src/path_operation_advanced_configuration/tutorial007_pv1.py!}
    ```
    
    ////
    
    /// info
    
    In Pydantic version 1 the method to get the JSON Schema for a model was called `Item.schema()`, in Pydantic version 2, the method is called `Item.model_json_schema()`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  7. pyproject.toml

    "docs_src/custom_response/tutorial007.py" = ["B007"]
    "docs_src/dataclasses/tutorial003.py" = ["I001"]
    "docs_src/path_operation_advanced_configuration/tutorial007.py" = ["B904"]
    "docs_src/path_operation_advanced_configuration/tutorial007_pv1.py" = ["B904"]
    "docs_src/custom_request_and_route/tutorial002.py" = ["B904"]
    "docs_src/dependencies/tutorial008_an.py" = ["F821"]
    "docs_src/dependencies/tutorial008_an_py39.py" = ["F821"]
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 22 14:19:56 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  8. docs/de/docs/advanced/settings.md

    /// info
    
    In Pydantic v1 würden Sie `BaseSettings` direkt von `pydantic` statt von `pydantic_settings` importieren.
    
    ///
    
    ```Python hl_lines="2  5-8  11"
    {!> ../../docs_src/settings/tutorial001_pv1.py!}
    ```
    
    ////
    
    /// tip | "Tipp"
    
    Für ein schnelles Copy-and-paste verwenden Sie nicht dieses Beispiel, sondern das letzte unten.
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 17.7K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/schema-extra-example.md

    ```Python hl_lines="15-26"
    {!> ../../docs_src/schema_extra_example/tutorial001.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+ Pydantic v1
    
    ```Python hl_lines="15-25"
    {!> ../../docs_src/schema_extra_example/tutorial001_pv1.py!}
    ```
    
    ////
    
    That extra info will be added as-is to the output **JSON Schema** for that model, and it will be used in the API docs.
    
    //// tab | Pydantic v2
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  10. docs/de/docs/tutorial/schema-extra-example.md

    ```Python hl_lines="15-26"
    {!> ../../docs_src/schema_extra_example/tutorial001.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+ Pydantic v1
    
    ```Python hl_lines="15-25"
    {!> ../../docs_src/schema_extra_example/tutorial001_pv1.py!}
    ```
    
    ////
    
    Diese zusätzlichen Informationen werden unverändert zum für dieses Modell ausgegebenen **JSON-Schema** hinzugefügt und in der API-Dokumentation verwendet.
    
    //// tab | Pydantic v2
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 13.2K bytes
    - Viewed (0)
Back to top