Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 188 for nice (0.15 sec)

  1. docs_src/schema_extra_example/tutorial004.py

    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
        item: Item = Body(
            examples=[
                {
                    "name": "Foo",
                    "description": "A very nice Item",
                    "price": 35.4,
                    "tax": 3.2,
                },
                {
                    "name": "Bar",
                    "price": "35.4",
                },
                {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jul 01 16:43:29 GMT 2023
    - 824 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_schema_extra_example/test_tutorial001.py

        return client
    
    
    @needs_pydanticv2
    def test_post_body_example(client: TestClient):
        response = client.put(
            "/items/5",
            json={
                "name": "Foo",
                "description": "A very nice Item",
                "price": 35.4,
                "tax": 3.2,
            },
        )
        assert response.status_code == 200
    
    
    @needs_pydanticv2
    def test_openapi_schema(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  3. docs_src/schema_extra_example/tutorial003_an_py39.py

    async def update_item(
        item_id: int,
        item: Annotated[
            Item,
            Body(
                examples=[
                    {
                        "name": "Foo",
                        "description": "A very nice Item",
                        "price": 35.4,
                        "tax": 3.2,
                    }
                ],
            ),
        ],
    ):
        results = {"item_id": item_id, "item": item}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 692 bytes
    - Viewed (0)
  4. docs_src/schema_extra_example/tutorial001.py

        tax: Union[float, None] = None
    
        model_config = {
            "json_schema_extra": {
                "examples": [
                    {
                        "name": "Foo",
                        "description": "A very nice Item",
                        "price": 35.4,
                        "tax": 3.2,
                    }
                ]
            }
        }
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 684 bytes
    - Viewed (0)
  5. tests/test_tutorial/test_schema_extra_example/test_tutorial005.py

        return client
    
    
    def test_post_body_example(client: TestClient):
        response = client.put(
            "/items/5",
            json={
                "name": "Foo",
                "description": "A very nice Item",
                "price": 35.4,
                "tax": 3.2,
            },
        )
        assert response.status_code == 200
    
    
    def test_openapi_schema(client: TestClient) -> None:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 26 18:03:13 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_schema_extra_example/test_tutorial005_py310.py

        return client
    
    
    @needs_py310
    def test_post_body_example(client: TestClient):
        response = client.put(
            "/items/5",
            json={
                "name": "Foo",
                "description": "A very nice Item",
                "price": 35.4,
                "tax": 3.2,
            },
        )
        assert response.status_code == 200
    
    
    @needs_py310
    def test_openapi_schema(client: TestClient) -> None:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 26 18:03:13 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_schema_extra_example/test_tutorial001_pv1.py

        return client
    
    
    @needs_pydanticv1
    def test_post_body_example(client: TestClient):
        response = client.put(
            "/items/5",
            json={
                "name": "Foo",
                "description": "A very nice Item",
                "price": 35.4,
                "tax": 3.2,
            },
        )
        assert response.status_code == 200
    
    
    @needs_pydanticv1
    def test_openapi_schema(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  8. docs_src/schema_extra_example/tutorial005_an_py39.py

                        "description": "A **normal** item works correctly.",
                        "value": {
                            "name": "Foo",
                            "description": "A very nice Item",
                            "price": 35.4,
                            "tax": 3.2,
                        },
                    },
                    "converted": {
                        "summary": "An example with converted data",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 26 18:03:13 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  9. docs_src/schema_extra_example/tutorial005_py310.py

                    "summary": "A normal example",
                    "description": "A **normal** item works correctly.",
                    "value": {
                        "name": "Foo",
                        "description": "A very nice Item",
                        "price": 35.4,
                        "tax": 3.2,
                    },
                },
                "converted": {
                    "summary": "An example with converted data",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 26 18:03:13 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  10. docs_src/schema_extra_example/tutorial003.py

    
    @app.put("/items/{item_id}")
    async def update_item(
        item_id: int,
        item: Item = Body(
            examples=[
                {
                    "name": "Foo",
                    "description": "A very nice Item",
                    "price": 35.4,
                    "tax": 3.2,
                }
            ],
        ),
    ):
        results = {"item_id": item_id, "item": item}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 612 bytes
    - Viewed (0)
Back to top