Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 255 for items (0.14 sec)

  1. tests/test_tutorial/test_query_params_str_validations/test_tutorial010.py

            "items": [{"item_id": "Foo"}, {"item_id": "Bar"}],
            "q": "fixedquery",
        }
    
    
    def test_query_params_str_validations_q_fixedquery(client: TestClient):
        response = client.get("/items/", params={"q": "fixedquery"})
        assert response.status_code == 200
        assert response.json() == {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
    
    
    def test_query_params_str_validations_item_query_nonregexquery(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_query_params_str_validations/test_tutorial010_an_py39.py

            "items": [{"item_id": "Foo"}, {"item_id": "Bar"}],
            "q": "fixedquery",
        }
    
    
    @needs_py39
    def test_query_params_str_validations_q_fixedquery(client: TestClient):
        response = client.get("/items/", params={"q": "fixedquery"})
        assert response.status_code == 200
        assert response.json() == {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
    
    
    @needs_py39
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_body_fields/test_tutorial001_an.py

                        },
                    },
                    "Body_update_item_items__item_id__put": {
                        "title": "Body_update_item_items__item_id__put",
                        "required": ["item"],
                        "type": "object",
                        "properties": {"item": {"$ref": "#/components/schemas/Item"}},
                    },
                    "ValidationError": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_body_fields/test_tutorial001_an_py39.py

                        },
                    },
                    "Body_update_item_items__item_id__put": {
                        "title": "Body_update_item_items__item_id__put",
                        "required": ["item"],
                        "type": "object",
                        "properties": {"item": {"$ref": "#/components/schemas/Item"}},
                    },
                    "ValidationError": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_bigger_applications/test_main.py

                },
                "/items/{item_id}": {
                    "get": {
                        "tags": ["items"],
                        "summary": "Read Item",
                        "operationId": "read_item_items__item_id__get",
                        "parameters": [
                            {
                                "required": True,
                                "schema": {"title": "Item Id", "type": "string"},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.6K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_body_fields/test_tutorial001_an_py310.py

                        },
                    },
                    "Body_update_item_items__item_id__put": {
                        "title": "Body_update_item_items__item_id__put",
                        "required": ["item"],
                        "type": "object",
                        "properties": {"item": {"$ref": "#/components/schemas/Item"}},
                    },
                    "ValidationError": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_extra_data_types/test_tutorial001_an_py310.py

                                        }
                                    )
                                }
                            },
                        },
                    }
                }
            },
            "components": {
                "schemas": {
                    "Body_read_items_items__item_id__put": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Apr 19 00:11:40 GMT 2024
    - 7K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_dependencies/test_tutorial006_an_py39.py

                                        }
                                    }
                                },
                            },
                        },
                        "summary": "Read Items",
                        "operationId": "read_items_items__get",
                        "parameters": [
                            {
                                "required": True,
                                "schema": {"title": "X-Token", "type": "string"},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/bigger-applications.md

    * look for the subpackage `routers` (the directory at `app/routers/`)...
    * and from it, import the submodule `items` (the file at `app/routers/items.py`) and `users` (the file at `app/routers/users.py`)...
    
    The module `items` will have a variable `router` (`items.router`). This is the same one we created in the file `app/routers/items.py`, it's an `APIRouter` object.
    
    And then we do the same for the module `users`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  10. tests/test_multi_body_errors.py

    from pydantic import BaseModel, condecimal
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        age: condecimal(gt=Decimal(0.0))  # type: ignore
    
    
    @app.post("/items/")
    def save_item_no_body(item: List[Item]):
        return {"item": item}
    
    
    client = TestClient(app)
    
    
    def test_put_correct_body():
        response = client.post("/items/", json=[{"name": "Foo", "age": 5}])
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.6K bytes
    - Viewed (0)
Back to top