- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 525 for name (0.16 sec)
-
tests/test_filter_pydantic_sub_model_pv2.py
def lower_username(cls, name: str, info: ValidationInfo): if not name.endswith("A"): raise ValueError("name must end in A") return name async def get_model_c() -> ModelC: return ModelC(username="test-user", password="test-password") @app.get("/model/{name}", response_model=ModelA) async def get_model_a(name: str, model_c=Depends(get_model_c)):
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 6.3K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial004_an_py39.py
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 5.6K bytes - Viewed (0) -
docs_src/python_types/tutorial002.py
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 172 bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial005_py310.py
from ...utils import needs_py310 @pytest.fixture(name="client") def get_client(): from docs_src.response_model.tutorial005_py310 import app client = TestClient(app) return client @needs_py310 def test_read_item_name(client: TestClient): response = client.get("/items/bar/name") assert response.status_code == 200, response.text assert response.json() == {"name": "Bar", "description": "The Bar fighters"}
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Aug 04 20:47:07 GMT 2023 - 6.2K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial005.py
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Aug 04 20:47:07 GMT 2023 - 6K bytes - Viewed (0) -
docs_src/additional_status_codes/tutorial001.py
app = FastAPI() items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}} @app.put("/items/{item_id}") async def upsert_item( item_id: str, name: Union[str, None] = Body(default=None), size: Union[int, None] = Body(default=None), ): if item_id in items: item = items[item_id] item["name"] = name item["size"] = size return item
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 684 bytes - Viewed (0) -
docs_src/response_model/tutorial005_py310.py
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): 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,
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 816 bytes - Viewed (0) -
tests/test_response_model_include_exclude.py
assert response.json() == { "name": "mixed model3 name", "ref2": { "ref": {"foo": "mixed model foo", "bar": "mixed model bar"}, }, } def test_nested_include_mixed_dict(): response = client.get("/mixed_dict") assert response.status_code == 200, response.text assert response.json() == { "name": "mixed_dict model3 name", "ref2": {
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Mon Jul 19 19:14:58 GMT 2021 - 4K bytes - Viewed (0) -
docs_src/metadata/tutorial004.py
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat Jun 13 11:58:06 GMT 2020 - 693 bytes - Viewed (0) -
tests/test_validate_response_recursive/test_validate_response_recursive_pv1.py
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 900 bytes - Viewed (0)