- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for Mask (0.14 sec)
-
tests/test_tutorial/test_response_change_status_code/test_tutorial001.py
client = TestClient(app) def test_path_operation(): response = client.put("/get-or-create-task/foo") print(response.content) assert response.status_code == 200, response.text assert response.json() == "Listen to the Bar Fighters" response = client.put("/get-or-create-task/bar") assert response.status_code == 201, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jul 09 18:06:12 GMT 2020 - 521 bytes - Viewed (0) -
docs_src/background_tasks/tutorial002_an_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: Annotated[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: Sat Mar 18 12:29:59 GMT 2023 - 683 bytes - Viewed (1) -
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) -
fastapi/dependencies/utils.py
) -> None: result = await fn() results.append(result) # noqa: B023 async with anyio.create_task_group() as tg: for sub_value in value: tg.start_soon(process_fn, sub_value.read) value = serialize_sequence_value(field=field, value=results)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 02 02:52:56 GMT 2024 - 29.5K bytes - Viewed (0) -
docs_src/response_change_status_code/tutorial001.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 391 bytes - Viewed (0) -
docs_src/background_tasks/tutorial002_an.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: Annotated[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: Sat Mar 18 12:29:59 GMT 2023 - 725 bytes - Viewed (0) -
docs_src/background_tasks/tutorial002.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: Sat May 14 11:59:59 GMT 2022 - 675 bytes - Viewed (0) -
docs_src/background_tasks/tutorial001.py
email_file.write(content) @app.post("/send-notification/{email}") async def send_notification(email: str, background_tasks: BackgroundTasks): background_tasks.add_task(write_notification, email, message="some notification")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 519 bytes - Viewed (0) -
tests/test_dependency_contextmanager.py
async def get_context_b_bg(tasks: BackgroundTasks, state: dict = Depends(context_b)): async def bg(state: dict): state["bg"] = f"bg set - b: {state['context_b']} - a: {state['context_a']}" tasks.add_task(bg, state) return state # Sync versions @app.get("/sync_async") def get_sync_async(state: str = Depends(asyncgen_state)): return state @app.get("/sync_sync")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 11.6K bytes - Viewed (0) -
fastapi/background.py
async def send_notification(email: str, background_tasks: BackgroundTasks): background_tasks.add_task(write_notification, email, message="some notification") return {"message": "Notification sent in the background"} ``` """ def add_task( self, func: Annotated[ Callable[P, Any], Doc( """
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 1.7K bytes - Viewed (0)