- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 72 for primed (0.17 sec)
-
docs/es/docs/tutorial/cookie-params.md
{!> ../../../docs_src/cookie_params/tutorial001.py!} ``` ## Declarar parámetros de `Cookie` Luego declara los parámetros de cookie usando la misma estructura que con `Path` y `Query`. El primer valor es el valor por defecto, puedes pasar todos los parámetros adicionales de validación o anotación: === "Python 3.10+" ```Python hl_lines="9" {!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!}
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Apr 19 19:30:26 GMT 2024 - 2.4K bytes - Viewed (0) -
tests/test_serialize_response.py
assert response.json() == {"name": "coerce", "price": 1.0, "owner_ids": None} def test_validlist(): response = client.get("/items/validlist") response.raise_for_status() assert response.json() == [ {"name": "foo", "price": None, "owner_ids": None}, {"name": "bar", "price": 1.0, "owner_ids": None}, {"name": "baz", "price": 2.0, "owner_ids": [1, 2, 3]},
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_tutorial/test_body/test_tutorial001_py310.py
response = client.post("/items/", json={"name": "Foo", "price": 50.5}) assert response.status_code == 200 assert response.json() == { "name": "Foo", "price": 50.5, "description": None, "tax": None, } @needs_py310 def test_post_with_str_float(client: TestClient): response = client.post("/items/", json={"name": "Foo", "price": "50.5"}) assert response.status_code == 200
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 15K bytes - Viewed (2) -
tests/test_tutorial/test_body/test_tutorial001.py
response = client.post("/items/", json={"name": "Foo", "price": 50.5}) assert response.status_code == 200 assert response.json() == { "name": "Foo", "price": 50.5, "description": None, "tax": None, } def test_post_with_str_float(client: TestClient): response = client.post("/items/", json={"name": "Foo", "price": "50.5"}) assert response.status_code == 200
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 14.7K bytes - Viewed (7) -
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) -
tests/test_validate_response.py
else: return {"name": "invalid", "price": 3.2} @app.get("/items/innerinvalid", response_model=Item) def get_innerinvalid(): return {"name": "double invalid", "price": "foo", "owner_ids": ["foo", "bar"]} @app.get("/items/invalidlist", response_model=List[Item]) def get_invalidlist(): return [ {"name": "foo"}, {"name": "bar", "price": "bar"}, {"name": "baz", "price": "baz"},
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 2K bytes - Viewed (0) -
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 May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 429 bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial005_an.py
"price": 35.4, "tax": 3.2, }, }, "converted": { "summary": "An example with converted data", "description": "FastAPI can convert price `strings` to actual `numbers` automatically",
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Aug 26 18:03:13 GMT 2023 - 6.7K 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) -
docs_src/schema_extra_example/tutorial004_an_py39.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jul 01 16:43:29 GMT 2023 - 936 bytes - Viewed (0)