- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 113 for add (0.15 sec)
-
docs_src/background_tasks/tutorial002_py310.py
if q: message = f"found query: {q}\n" background_tasks.add_task(write_log, message) return q @app.post("/send-notification/{email}") async def send_notification( email: str, background_tasks: BackgroundTasks, q: str = Depends(get_query) ): message = f"message to {email}\n" background_tasks.add_task(write_log, message)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 643 bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py
@needs_py39 # TODO: pv2 add version with Pydantic v2 @needs_pydanticv1 def test_get_user(client): response = client.get("/users/1") assert response.status_code == 200, response.text data = response.json() assert "email" in data assert "id" in data @needs_py39 # TODO: pv2 add version with Pydantic v2 @needs_pydanticv1 def test_nonexistent_user(client):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py
@needs_py310 # TODO: pv2 add version with Pydantic v2 @needs_pydanticv1 def test_get_user(client): response = client.get("/users/1") assert response.status_code == 200, response.text data = response.json() assert "email" in data assert "id" in data @needs_py310 # TODO: pv2 add version with Pydantic v2 @needs_pydanticv1 def test_nonexistent_user(client):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py
@needs_py39 # TODO: pv2 add version with Pydantic v2 @needs_pydanticv1 def test_get_user(client): response = client.get("/users/1") assert response.status_code == 200, response.text data = response.json() assert "email" in data assert "id" in data @needs_py39 # TODO: pv2 add version with Pydantic v2 @needs_pydanticv1 def test_nonexistent_user(client):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0) -
docs/de/docs/advanced/middleware.md
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 30 20:18:15 GMT 2024 - 4.4K bytes - Viewed (0) -
docs/en/docs/tutorial/handling-errors.md
They are handled automatically by **FastAPI** and converted to JSON. ## Add custom headers There are some situations in where it's useful to be able to add custom headers to the HTTP error. For example, for some types of security. You probably won't need to use it directly in your code. But in case you needed it for an advanced scenario, you can add custom headers: ```Python hl_lines="14"
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.1K bytes - Viewed (0) -
docs/em/docs/advanced/middleware.md
``` βοΈ FastAPI (π€ π) π π π β«οΈ π β π π π π οΈ π΅ π½ β & π β πβπ¦Ί π· β. π, π βοΈ `app.add_middleware()` (πΌ β). ```Python from fastapi import FastAPI from unicorn import UnicornMiddleware app = FastAPI() app.add_middleware(UnicornMiddleware, some_config="rainbow") ``` `app.add_middleware()` π¨ π οΈ π π₯ β & π π β πΆββοΈ π οΈ. ## π οΈ π οΈ
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 3.3K bytes - Viewed (0) -
docs_src/advanced_middleware/tutorial002.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 279 bytes - Viewed (0) -
docs/en/docs/advanced/events.md
### `startup` event To add a function that should be run before the application starts, declare it with the event `"startup"`: ```Python hl_lines="8" {!../../../docs_src/events/tutorial001.py!} ``` In this case, the `startup` event handler function will initialize the items "database" (just a `dict`) with some values. You can add more than one event handler function.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 7.8K bytes - Viewed (0) -
.github/workflows/issue-manager.yml
Others - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Jan 30 18:46:56 GMT 2024 - 1.1K bytes - Viewed (0)