Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for geturl (0.13 sec)

  1. docs_src/query_params_str_validations/tutorial005.py

    
    @app.get("/items/")
    async def read_items(q: str = Query(default="fixedquery", min_length=3)):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 276 bytes
    - Viewed (0)
  2. docs_src/path_operation_configuration/tutorial005.py

        - **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 May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 741 bytes
    - Viewed (0)
  3. docs_src/dependencies/tutorial005.py

    
    def query_extractor(q: Union[str, None] = None):
        return q
    
    
    def query_or_cookie_extractor(
        q: str = Depends(query_extractor),
        last_query: Union[str, None] = Cookie(default=None),
    ):
        if not q:
            return last_query
        return q
    
    
    @app.get("/items/")
    async def read_query(query_or_default: str = Depends(query_or_cookie_extractor)):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 486 bytes
    - Viewed (0)
  4. docs_src/body_multiple_params/tutorial005.py

        price: float
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item = Body(embed=True)):
        results = {"item_id": item_id, "item": item}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 407 bytes
    - Viewed (0)
  5. docs_src/body_nested_models/tutorial005.py

        tags: Set[str] = set()
        image: Union[Image, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
        results = {"item_id": item_id, "item": item}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 517 bytes
    - Viewed (0)
  6. docs_src/schema_extra_example/tutorial005.py

                        "name": "Baz",
                        "price": "thirty five point four",
                    },
                },
            },
        ),
    ):
        results = {"item_id": item_id, "item": item}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Aug 26 18:03:13 GMT 2023
    - 1.4K bytes
    - Viewed (0)
Back to top