- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 99 for baz (0.12 sec)
-
tests/test_query.py
} ] } ) def test_query_query_baz(): response = client.get("/query?query=baz") assert response.status_code == 200 assert response.json() == "foo bar baz" def test_query_not_declared_baz(): response = client.get("/query?not_declared=baz") assert response.status_code == 422 assert response.json() == IsDict( {
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 11.4K bytes - Viewed (0) -
docs_src/response_model/tutorial006.py
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", response_model=Item,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 848 bytes - Viewed (0) -
docs_src/response_model/tutorial004.py
tax: float = 10.5 tags: List[str] = [] items = { "foo": {"name": "Foo", "price": 50.2}, "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2}, "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []}, } @app.get("/items/{item_id}", response_model=Item, response_model_exclude_unset=True) async def read_item(item_id: str):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 633 bytes - Viewed (0) -
docs_src/body_updates/tutorial001_py39.py
tax: float = 10.5 tags: list[str] = [] items = { "foo": {"name": "Foo", "price": 50.2}, "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2}, "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]
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 900 bytes - Viewed (0) -
tests/test_serialize_response.py
@app.get("/items/validlist", response_model=List[Item]) def get_validlist(): return [ {"name": "foo"}, {"name": "bar", "price": 1.0}, {"name": "baz", "price": 2.0, "owner_ids": [1, 2, 3]}, ] client = TestClient(app) def test_valid(): response = client.get("/items/valid") response.raise_for_status()
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Aug 03 12:29:07 GMT 2020 - 1.4K bytes - Viewed (0) -
tests/test_validate_response.py
@app.get("/items/invalidlist", response_model=List[Item]) def get_invalidlist(): return [ {"name": "foo"}, {"name": "bar", "price": "bar"}, {"name": "baz", "price": "baz"}, ] client = TestClient(app) def test_invalid(): with pytest.raises(ResponseValidationError): client.get("/items/invalid") def test_invalid_none():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 2K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial004_an_py310.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 7.1K bytes - Viewed (0) -
docs_src/dependencies/tutorial003_an_py310.py
from typing import Annotated, Any from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: str | None = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 655 bytes - Viewed (0) -
docs_src/dependencies/tutorial002.py
from typing import Union from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 656 bytes - Viewed (0) -
docs_src/schema_extra_example/tutorial004_an.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jul 01 16:43:29 GMT 2023 - 965 bytes - Viewed (0)