- Sort Score
- Result 10 results
- Languages All
Results 561 - 570 of 1,127 for def2 (0.02 sec)
-
docs/de/docs/advanced/dataclasses.md
Auch hier können Sie `dataclasses` mit Standard-Typannotationen kombinieren. 8. Beachten Sie, dass diese *Pfadoperation-Funktion* reguläres `def` anstelle von `async def` verwendet. Wie immer können Sie in FastAPI `def` und `async def` beliebig kombinieren.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.6K bytes - Viewed (0) -
docs/en/docs/advanced/dataclasses.md
Again, you can combine `dataclasses` with standard type annotations. 8. Notice that this *path operation function* uses regular `def` instead of `async def`. As always, in FastAPI you can combine `def` and `async def` as needed.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 10:35:06 UTC 2024 - 4K bytes - Viewed (0) -
ci/official/requirements_updater/BUILD.bazel
# See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== load("@python//:defs.bzl", "compile_pip_requirements") load("@python_version_repo//:py_version.bzl", "REQUIREMENTS") compile_pip_requirements( name = "requirements", extra_args = [ "--allow-unsafe",
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Jun 29 00:19:18 UTC 2024 - 1K bytes - Viewed (0) -
docs/ru/docs/index.md
app = FastAPI() @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} ``` <details markdown="1"> <summary>Или используйте <code>async def</code>...</summary> Если ваш код использует `async` / `await`, используйте `async def`: ```Python hl_lines="9 14"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 25.8K bytes - Viewed (0) -
docs_src/body_updates/tutorial001.py
"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] @app.put("/items/{item_id}", response_model=Item) async def update_item(item_id: str, item: Item): update_item_encoded = jsonable_encoder(item) items[item_id] = update_item_encoded
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 906 bytes - Viewed (0) -
docs_src/body_updates/tutorial002_py310.py
"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] @app.patch("/items/{item_id}", response_model=Item) async def update_item(item_id: str, item: Item): stored_item_data = items[item_id] stored_item_model = Item(**stored_item_data)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 1010 bytes - Viewed (0) -
tests/test_tutorial/test_cookie_params/test_tutorial001_an_py310.py
], ) def test(path, cookies, expected_status, expected_response): from docs_src.cookie_params.tutorial001_an_py310 import app client = TestClient(app, cookies=cookies) response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response @needs_py310 def test_openapi_schema():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.1K bytes - Viewed (0) -
docs_src/body_updates/tutorial002.py
"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] @app.patch("/items/{item_id}", response_model=Item) async def update_item(item_id: str, item: Item): stored_item_data = items[item_id] stored_item_model = Item(**stored_item_data)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 1K bytes - Viewed (0) -
tests/test_tutorial/test_behind_a_proxy/test_tutorial004.py
from fastapi.testclient import TestClient from docs_src.behind_a_proxy.tutorial004 import app client = TestClient(app) def test_main(): response = client.get("/app") assert response.status_code == 200 assert response.json() == {"message": "Hello World", "root_path": "/api/v1"} def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200 assert response.json() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.6K bytes - Viewed (0) -
tests/test_tutorial/test_metadata/test_tutorial004.py
from docs_src.metadata.tutorial004 import app client = TestClient(app) def test_path_operations(): response = client.get("/items/") assert response.status_code == 200, response.text response = client.get("/users/") assert response.status_code == 200, response.text def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2K bytes - Viewed (0)