- Sort Score
- Result 10 results
- Languages All
Results 611 - 620 of 1,042 for fo2o (0.05 sec)
-
docs_src/schema_extra_example/tutorial002.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel, Field app = FastAPI() class Item(BaseModel): name: str = Field(examples=["Foo"]) description: Union[str, None] = Field(default=None, examples=["A very nice Item"]) price: float = Field(examples=[35.4]) tax: Union[float, None] = Field(default=None, examples=[3.2]) @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 517 bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial002.py
from fastapi import FastAPI from fastapi.routing import APIRoute app = FastAPI() @app.get("/items/") async def read_items(): return [{"item_id": "Foo"}] def use_route_names_as_operation_ids(app: FastAPI) -> None: """ Simplify operation IDs so that generated API clients have simpler function names. Should be called only after all routes have been added. """ for route in app.routes:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 572 bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial002_py310.py
@app.post("/items/", response_model=Item, tags=["items"]) async def create_item(item: Item): return item @app.get("/items/", tags=["items"]) async def read_items(): return [{"name": "Foo", "price": 42}] @app.get("/users/", tags=["users"]) async def read_users():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 537 bytes - Viewed (0) -
docs_src/extra_models/tutorial005.py
from typing import Dict from fastapi import FastAPI app = FastAPI() @app.get("/keyword-weights/", response_model=Dict[str, float]) async def read_keyword_weights():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 205 bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an_py310.py
assert response.json() == {"detail": "Incorrect username or password"} @needs_py310 def test_login_incorrect_username(client: TestClient): response = client.post("/token", data={"username": "foo", "password": "secret"}) assert response.status_code == 400, response.text assert response.json() == {"detail": "Incorrect username or password"} @needs_py310 def test_no_token(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
compat/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/reflection/MethodMap.java
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 14.2K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial010_an_py310.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 622 bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial003.py
"/items/5", json={ "importance": 2, "item": {"name": "Foo", "price": 50.5}, "user": {"username": "Dave"}, }, ) assert response.status_code == 200 assert response.json() == { "item_id": 5, "importance": 2, "item": { "name": "Foo", "price": 50.5, "description": None, "tax": None,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9.4K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial005_py310.py
return client @needs_py310 def test_query_params_str_validations(client: TestClient): response = client.post("/items/", json={"name": "Foo", "price": 42}) assert response.status_code == 200, response.text assert response.json() == { "name": "Foo", "price": 42, "description": None, "tax": None, "tags": [], } @needs_py310 @needs_pydanticv2
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 28 04:14:40 UTC 2023 - 8.9K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial010_py310.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 542 bytes - Viewed (0)