- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 142 for get_query (0.1 sec)
-
docs_src/background_tasks/tutorial002_an_py310.py
log.write(message) def get_query(background_tasks: BackgroundTasks, q: str | None = None): 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"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 683 bytes - Viewed (0) -
docs_src/background_tasks/tutorial002.py
log.write(message) def get_query(background_tasks: BackgroundTasks, q: Union[str, None] = None): 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"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 675 bytes - Viewed (0) -
docs_src/background_tasks/tutorial002_py310.py
log.write(message) def get_query(background_tasks: BackgroundTasks, q: str | None = None): 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"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 643 bytes - Viewed (0) -
docs_src/background_tasks/tutorial002_an_py39.py
log.write(message) def get_query(background_tasks: BackgroundTasks, q: Union[str, None] = None): 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"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 696 bytes - Viewed (0) -
docs_src/background_tasks/tutorial002_an.py
log.write(message) def get_query(background_tasks: BackgroundTasks, q: Union[str, None] = None): 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"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 725 bytes - Viewed (0) -
docs/ru/docs/tutorial/background-tasks.md
Если бы в запрос был передан query-параметр `q`, он бы первыми записался в `log.txt` фоновой задачей (потому что вызывается в зависимости `get_query`). После другая фоновая задача, которая была сгенерирована в функции, запишет сообщение из параметра `email`. ## Технические детали
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8K bytes - Viewed (0) -
tests/main.py
return item_id @app.get("/path/param-le-ge-int/{item_id}") def get_path_param_le_ge_int(item_id: int = Path(le=3, ge=1)): return item_id @app.get("/query") def get_query(query): return f"foo bar {query}" @app.get("/query/optional") def get_query_optional(query=None): if query is None: return "foo bar" return f"foo bar {query}"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 4.3K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/util/QueryStringBuilderTest.java
assertEquals("aaa\\/bbb", getQuery("aaa/bbb", new String[0], Collections.emptyMap(), Collections.emptyMap(), true)); assertEquals("\\\\", getQuery("\\", new String[0], Collections.emptyMap(), Collections.emptyMap(), true)); assertEquals("\\\\\\\\", getQuery("\\\\", new String[0], Collections.emptyMap(), Collections.emptyMap(), true));
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:37:57 UTC 2024 - 7K bytes - Viewed (0) -
tests/test_query.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from .main import app client = TestClient(app) def test_query(): response = client.get("/query") assert response.status_code == 422 assert response.json() == IsDict( { "detail": [ { "type": "missing", "loc": ["query", "query"],
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 11.4K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/es/config/cbean/bs/BsCrawlingInfoCB.java
@Override public SearchRequestBuilder build(SearchRequestBuilder builder) { if (_conditionQuery != null) { QueryBuilder queryBuilder = _conditionQuery.getQuery(); if (queryBuilder != null) { builder.setQuery(queryBuilder); } _conditionQuery.getFieldSortBuilderList().forEach(sort -> { builder.addSort(sort); }); }
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:37:57 UTC 2024 - 6.7K bytes - Viewed (0)