- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for price_with_tax (0.18 sec)
-
docs_src/body/tutorial002_py310.py
app = FastAPI() @app.post("/items/") async def create_item(item: Item): item_dict = item.model_dump() if item.tax is not None: price_with_tax = item.price + item.tax item_dict.update({"price_with_tax": price_with_tax})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 447 bytes - Viewed (0) -
docs_src/body/tutorial002_py39.py
app = FastAPI() @app.post("/items/") async def create_item(item: Item): item_dict = item.model_dump() if item.tax is not None: price_with_tax = item.price + item.tax item_dict.update({"price_with_tax": price_with_tax})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 485 bytes - Viewed (0) -
tests/test_tutorial/test_body/test_tutorial002.py
) assert response.status_code == 200 assert response.json() == { "name": "Foo", "price": 50.5, "description": "Some Foo", "tax": 0.3, "price_with_tax": 50.8, } @pytest.mark.parametrize("price", ["50.5", 50.5]) def test_post_without_tax(client: TestClient, price: Union[str, float]): response = client.post(Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 5.3K bytes - Viewed (0)