- Sort Score
- Result 10 results
- Languages All
Results 641 - 650 of 1,127 for def2 (0.1 sec)
-
docs/en/docs/tutorial/background-tasks.md
It is just a standard function that can receive parameters. It can be an `async def` or normal `def` function, **FastAPI** will know how to handle it correctly. In this case, the task function will write to a file (simulating sending an email). And as the write operation doesn't use `async` and `await`, we define the function with normal `def`: {* ../../docs_src/background_tasks/tutorial001.py hl[6:9] *} ## Add the background task
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 15:22:48 UTC 2024 - 4.8K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial005_an_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 309 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial007_py310.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 304 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial002_an_py310.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 309 bytes - Viewed (0) -
docs_src/settings/tutorial001_pv1.py
class Settings(BaseSettings): app_name: str = "Awesome API" admin_email: str items_per_user: int = 50 settings = Settings() app = FastAPI() @app.get("/info") async def info(): return { "app_name": settings.app_name, "admin_email": settings.admin_email, "items_per_user": settings.items_per_user,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 410 bytes - Viewed (0) -
docs_src/query_params/tutorial006b.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 301 bytes - Viewed (0) -
docs_src/header_param_models/tutorial001_py310.py
class CommonHeaders(BaseModel): host: str save_data: bool if_modified_since: str | None = None traceparent: str | None = None x_tag: list[str] = [] @app.get("/items/") async def read_items(headers: CommonHeaders = Header()):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 352 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial004.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 280 bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt
assertThat(response1.body.source().readUtf8(3)).isEqualTo("ABC") assertThat(response2.body.source().readUtf8(3)).isEqualTo("GHI") assertThat(response1.body.source().readUtf8(3)).isEqualTo("DEF") assertThat(response2.body.source().readUtf8(3)).isEqualTo("JKL") assertThat(server.takeRequest().sequenceNumber).isEqualTo(0) assertThat(server.takeRequest().sequenceNumber).isEqualTo(1) response1.close()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 75.3K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial004.py
# Test required and embedded body parameters with no bodies sent def test_post_body_example(): response = client.put( "/items/5", json={ "name": "Foo", "description": "A very nice Item", "price": 35.4, "tax": 3.2, }, ) assert response.status_code == 200 def test_openapi_schema(): response = client.get("/openapi.json")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 6.9K bytes - Viewed (0)