Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,043 for item (0.21 sec)

  1. docs_src/templates/templates/item.html

    <html>
    <head>
        <title>Item Details</title>
        <link href="{{ url_for('static', path='/styles.css') }}" rel="stylesheet">
    </head>
    <body>
        <h1><a href="{{ url_for('read_item', id=id) }}">Item ID: {{ id }}</a></h1>
    </body>
    HTML
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 22:25:37 GMT 2024
    - 235 bytes
    - Viewed (0)
  2. tests/test_dependency_duplicates.py

        return [item, item2]
    
    
    @app.post("/no-duplicates")
    async def no_duplicates(item: Item, item2: Item = Depends(dependency)):
        return [item, item2]
    
    
    @app.post("/with-duplicates-sub")
    async def no_duplicates_sub(
        item: Item, sub_items: List[Item] = Depends(sub_duplicate_dependency)
    ):
        return [item, sub_items]
    
    
    def test_no_duplicates_invalid():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  3. docs_src/extra_models/tutorial003_py310.py

        size: int
    
    
    items = {
        "item1": {"description": "All my friends drive a low rider", "type": "car"},
        "item2": {
            "description": "Music is my aeroplane, it's my aeroplane",
            "type": "plane",
            "size": 5,
        },
    }
    
    
    @app.get("/items/{item_id}", response_model=Union[PlaneItem, CarItem])
    async def read_item(item_id: str):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 644 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_extra_models/test_tutorial003.py

                        },
                        "summary": "Read Item",
                        "operationId": "read_item_items__item_id__get",
                        "parameters": [
                            {
                                "required": True,
                                "schema": {"title": "Item Id", "type": "string"},
                                "name": "item_id",
                                "in": "path",
                            }
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  5. tests/test_starlette_exception.py

    
    @app.get("/starlette-items/{item_id}")
    async def read_starlette_item(item_id: str):
        if item_id not in items:
            raise StarletteHTTPException(status_code=404, detail="Item not found")
        return {"item": items[item_id]}
    
    
    client = TestClient(app)
    
    
    def test_get_item():
        response = client.get("/items/foo")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_extra_models/test_tutorial003_py310.py

                        },
                        "summary": "Read Item",
                        "operationId": "read_item_items__item_id__get",
                        "parameters": [
                            {
                                "required": True,
                                "schema": {"title": "Item Id", "type": "string"},
                                "name": "item_id",
                                "in": "path",
                            }
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 5.3K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_response_model/test_tutorial006.py

                        },
                        "summary": "Read Item Name",
                        "operationId": "read_item_name_items__item_id__name_get",
                        "parameters": [
                            {
                                "required": True,
                                "schema": {"title": "Item Id", "type": "string"},
                                "name": "item_id",
                                "in": "path",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 6K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body_multiple_params/test_tutorial003.py

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

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

    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.put("/items/{item_id}")
    def save_item_no_body(item_id: str):
        return {"item_id": item_id}
    
    
    client = TestClient(app)
    
    
    def test_put_no_body():
        response = client.put("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"item_id": "foo"}
    
    
    def test_put_no_body_with_body():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.3K bytes
    - Viewed (0)
Back to top