Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 211 for tax (0.15 sec)

  1. tests/test_tutorial/test_path_operation_configurations/test_tutorial005_py310.py

                        "description": "Create an item with all the information:\n\n- **name**: each item must have a name\n- **description**: a long description\n- **price**: required\n- **tax**: if the item doesn't have tax, you can omit this\n- **tags**: a set of unique tag strings for this item",
                        "operationId": "create_item_items__post",
                        "requestBody": {
                            "content": {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 8.9K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_path_operation_configurations/test_tutorial005_py39.py

                        "description": "Create an item with all the information:\n\n- **name**: each item must have a name\n- **description**: a long description\n- **price**: required\n- **tax**: if the item doesn't have tax, you can omit this\n- **tags**: a set of unique tag strings for this item",
                        "operationId": "create_item_items__post",
                        "requestBody": {
                            "content": {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 8.9K bytes
    - Viewed (0)
  3. docs_src/response_model/tutorial006_py310.py

        name: str
        description: str | None = None
        price: float
        tax: float = 10.5
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The Bar fighters", "price": 62, "tax": 20.2},
        "baz": {
            "name": "Baz",
            "description": "There goes my baz",
            "price": 50.2,
            "tax": 10.5,
        },
    }
    
    
    @app.get(
        "/items/{item_id}/name",
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 816 bytes
    - Viewed (0)
  4. docs_src/response_model/tutorial005.py

        name: str
        description: Union[str, None] = None
        price: float
        tax: float = 10.5
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The Bar fighters", "price": 62, "tax": 20.2},
        "baz": {
            "name": "Baz",
            "description": "There goes my baz",
            "price": 50.2,
            "tax": 10.5,
        },
    }
    
    
    @app.get(
        "/items/{item_id}/name",
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 848 bytes
    - Viewed (0)
  5. docs_src/body/tutorial002_py310.py

    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
    
    
    app = FastAPI()
    
    
    @app.post("/items/")
    async def create_item(item: Item):
        item_dict = item.dict()
        if item.tax:
            price_with_tax = item.price + item.tax
            item_dict.update({"price_with_tax": price_with_tax})
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 429 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_dataclasses/test_tutorial002.py

                                {"title": "Description", "type": "string"}
                            ),
                            "tax": IsDict(
                                {
                                    "title": "Tax",
                                    "anyOf": [{"type": "number"}, {"type": "null"}],
                                }
                            )
                            | IsDict(
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  7. docs_src/path_operation_configuration/tutorial005_py310.py

        - **name**: each item must have a name
        - **description**: a long description
        - **price**: required
        - **tax**: if the item doesn't have tax, you can omit this
        - **tags**: a set of unique tag strings for this item
        """
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 698 bytes
    - Viewed (0)
  8. docs_src/path_operation_configuration/tutorial004.py

        price: float
        tax: Union[float, None] = None
        tags: Set[str] = set()
    
    
    @app.post("/items/", response_model=Item, summary="Create an item")
    async def create_item(item: Item):
        """
        Create an item with all the information:
    
        - **name**: each item must have a name
        - **description**: a long description
        - **price**: required
        - **tax**: if the item doesn't have tax, you can omit this
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 681 bytes
    - Viewed (0)
  9. tests/test_tutorial/test_response_model/test_tutorial004_py39.py

            (
                "/items/bar",
                {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
            ),
            (
                "/items/baz",
                {
                    "name": "Baz",
                    "description": None,
                    "price": 50.2,
                    "tax": 10.5,
                    "tags": [],
                },
            ),
        ],
    )
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_body_fields/test_tutorial001_an_py310.py

            "item": {"name": "Foo", "price": 3.0, "description": None, "tax": None},
        }
    
    
    @needs_py310
    def test_items_6(client: TestClient):
        response = client.put(
            "/items/6",
            json={
                "item": {
                    "name": "Bar",
                    "price": 0.2,
                    "description": "Some bar",
                    "tax": "5.4",
                }
            },
        )
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.3K bytes
    - Viewed (0)
Back to top