- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for PATCH (0.18 sec)
-
docs_src/body_updates/tutorial002.py
"baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []}, } @app.get("/items/{item_id}", response_model=Item) async def read_item(item_id: str): return items[item_id] @app.patch("/items/{item_id}", response_model=Item) async def update_item(item_id: str, item: Item): stored_item_data = items[item_id] stored_item_model = Item(**stored_item_data) update_data = item.dict(exclude_unset=True)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 1K bytes - Viewed (0) -
tests/test_tutorial/test_body/test_tutorial001_py310.py
from unittest.mock import patch import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture def client(): from docs_src.body.tutorial001_py310 import app client = TestClient(app) return client @needs_py310 def test_body_float(client: TestClient): response = client.post("/items/", json={"name": "Foo", "price": 50.5})
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 15K bytes - Viewed (2) -
tests/test_tutorial/test_body/test_tutorial001.py
from unittest.mock import patch import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient @pytest.fixture def client(): from docs_src.body.tutorial001 import app client = TestClient(app) return client def test_body_float(client: TestClient): response = client.post("/items/", json={"name": "Foo", "price": 50.5}) assert response.status_code == 200
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 14.7K bytes - Viewed (7) -
docs_src/body_updates/tutorial002_py39.py
"baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []}, } @app.get("/items/{item_id}", response_model=Item) async def read_item(item_id: str): return items[item_id] @app.patch("/items/{item_id}", response_model=Item) async def update_item(item_id: str, item: Item): stored_item_data = items[item_id] stored_item_model = Item(**stored_item_data) update_data = item.dict(exclude_unset=True)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 1K bytes - Viewed (0) -
tests/test_extra_routes.py
} }, }, }, "summary": "Patch Item", "operationId": "patch_item_items__item_id__patch", "parameters": [ { "required": True,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 13.7K bytes - Viewed (0) -
fastapi/openapi/constants.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 153 bytes - Viewed (0) -
docs_src/body_updates/tutorial002_py310.py
"baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []}, } @app.get("/items/{item_id}", response_model=Item) async def read_item(item_id: str): return items[item_id] @app.patch("/items/{item_id}", response_model=Item) async def update_item(item_id: str, item: Item): stored_item_data = items[item_id] stored_item_model = Item(**stored_item_data) update_data = item.dict(exclude_unset=True)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 1010 bytes - Viewed (0) -
fastapi/openapi/models.py
put: Optional[Operation] = None post: Optional[Operation] = None delete: Optional[Operation] = None options: Optional[Operation] = None head: Optional[Operation] = None patch: Optional[Operation] = None trace: Optional[Operation] = None servers: Optional[List[Server]] = None parameters: Optional[List[Union[Parameter, Reference]]] = None class SecuritySchemeType(Enum):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 22:49:33 GMT 2024 - 15K bytes - Viewed (1) -
fastapi/applications.py
""" Add a *path operation* using an HTTP PATCH operation. ## Example ```python from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str description: str | None = None app = FastAPI() @app.patch("/items/") def update_item(item: Item):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 172.2K bytes - Viewed (0) -
fastapi/routing.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 170.1K bytes - Viewed (0)