- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 38 for Must (1.2 sec)
-
docs_src/path_operation_configuration/tutorial005.py
summary="Create an item", response_description="The created 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 - **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) -
docs_src/body_fields/tutorial001_an.py
class Item(BaseModel): name: str description: Union[str, None] = Field( default=None, title="The description of the item", max_length=300 ) price: float = Field(gt=0, description="The price must be greater than zero") tax: Union[float, None] = None @app.put("/items/{item_id}") async def update_item(item_id: int, item: Annotated[Item, Body(embed=True)]): results = {"item_id": item_id, "item": item}
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 611 bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial004_py310.py
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 - **tags**: a set of unique tag strings for this item """
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 638 bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial004.py
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 - **tags**: a set of unique tag strings for this item \f
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 717 bytes - Viewed (0) -
ci/official/containers/linux_arm64/devel.usertools/squash_testlogs.py
exit(0) # For test cases, only show the ones that failed that have text (a log) seen = collections.Counter() runfiles_matcher = re.compile(r"(/.*\.runfiles/)") for f in files.strip().splitlines(): # Just ignore any failures, they're probably not important try: r = JUnitXml.fromfile(f) except Exception as e: # pylint: disable=broad-except print("Ignoring this XML parse failure in {}: ".format(f), str(e))
Python - Registered: Tue May 07 12:40:20 GMT 2024 - Last Modified: Mon Sep 18 19:00:37 GMT 2023 - 4.8K bytes - Viewed (0) -
tests/test_tutorial/test_openapi_webhooks/test_tutorial001.py
client = TestClient(app) def test_get(): response = client.get("/users/") assert response.status_code == 200, response.text assert response.json() == ["Rick", "Morty"] def test_dummy_webhook(): # Just for coverage app.webhooks.routes[0].endpoint({}) def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == {
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Oct 20 09:00:44 GMT 2023 - 4.4K bytes - Viewed (2) -
tests/test_webhooks_security.py
data to the URL that you register for the event `new-subscription` in the dashboard. """ client = TestClient(app) def test_dummy_webhook(): # Just for coverage new_subscription(body={}, token="Bearer 123") def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Oct 20 09:00:44 GMT 2023 - 4.6K bytes - Viewed (0) -
tests/test_starlette_exception.py
raise HTTPException(status_code=204) @app.get("/http-no-body-statuscode-with-detail-exception") async def no_body_status_code_with_detail_exception(): raise HTTPException(status_code=204, detail="I should just disappear!") @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")
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) -
tests/test_filter_pydantic_sub_model_pv2.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 6.3K bytes - Viewed (0) -
docs_src/body_fields/tutorial001.py
class Item(BaseModel): name: str description: Union[str, None] = Field( default=None, title="The description of the item", max_length=300 ) price: float = Field(gt=0, description="The price must be greater than zero") 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 - 561 bytes - Viewed (0)