- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 24 for test_query (0.08 sec)
-
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_src/dependencies/tutorial005_py310.py
app = FastAPI() def query_extractor(q: str | None = None): return q def query_or_cookie_extractor( q: str = Depends(query_extractor), last_query: str | None = Cookie(default=None) ): if not q: return last_query return q @app.get("/items/") async def read_query(query_or_default: str = Depends(query_or_cookie_extractor)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 443 bytes - Viewed (0) -
docs_src/dependencies/tutorial005.py
app = FastAPI() def query_extractor(q: Union[str, None] = None): return q def query_or_cookie_extractor( q: str = Depends(query_extractor), last_query: Union[str, None] = Cookie(default=None), ): if not q: return last_query return q @app.get("/items/") async def read_query(query_or_default: str = Depends(query_or_cookie_extractor)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 486 bytes - Viewed (0) -
docs_src/dependencies/tutorial005_an_py310.py
app = FastAPI() def query_extractor(q: str | None = None): return q def query_or_cookie_extractor( q: Annotated[str, Depends(query_extractor)], last_query: Annotated[str | None, Cookie()] = None, ): if not q: return last_query return q @app.get("/items/") async def read_query( query_or_default: Annotated[str, Depends(query_or_cookie_extractor)], ):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 510 bytes - Viewed (0) -
docs/ru/docs/tutorial/dependencies/sub-dependencies.md
* Она зависит от `query_extractor` и присваивает возвращаемое ей значение параметру `q`. * Она также объявляет необязательный куки-параметр `last_query` в виде строки. * Если пользователь не указал параметр `q` в запросе, то мы используем последний использованный запрос, который мы ранее сохранили в куки-параметре `last_query`. ## Использование зависимости Затем мы можем использовать зависимость вместе с: //// tab | Python 3.10+
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.7K bytes - Viewed (0) -
src/main/resources/app.xml
<include path="fess.xml"/> <include path="fess_api.xml"/> <include path="fess_cors.xml"/> <include path="fess_dict.xml"/> <include path="fess_job.xml"/> <include path="fess_ldap.xml"/> <include path="fess_query.xml"/> <include path="fess_rankfusion.xml"/> <include path="fess_score.xml"/> <include path="fess_sso.xml"/> <include path="fess_thumbnail.xml"/> <include path="crawler/client.xml" />
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Sun Nov 19 02:22:47 UTC 2023 - 3.8K bytes - Viewed (0) -
docs/em/docs/tutorial/dependencies/sub-dependencies.md
``` //// ➡️ 🎯 🔛 🔢 📣: * ✋️ 👉 🔢 🔗 ("☑") ⚫️, ⚫️ 📣 ➕1️⃣ 🔗 (⚫️ "🪀" 🔛 🕳 🙆). * ⚫️ 🪀 🔛 `query_extractor`, & 🛠️ 💲 📨 ⚫️ 🔢 `q`. * ⚫️ 📣 📦 `last_query` 🍪, `str`. * 🚥 👩💻 🚫 🚚 🙆 🔢 `q`, 👥 ⚙️ 🏁 🔢 ⚙️, ❔ 👥 🖊 🍪 ⏭. ## ⚙️ 🔗 ⤴️ 👥 💪 ⚙️ 🔗 ⏮️: //// tab | 🐍 3️⃣.6️⃣ & 🔛 ```Python hl_lines="22"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.3K 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) -
docs/en/docs/tutorial/dependencies/sub-dependencies.md
* It depends on the `query_extractor`, and assigns the value returned by it to the parameter `q`. * It also declares an optional `last_query` cookie, as a `str`. * If the user didn't provide any query `q`, we use the last query used, which we saved to a cookie before. ## Use the dependency Then we can use the dependency with:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.5K bytes - Viewed (0) -
docs/de/docs/tutorial/dependencies/sub-dependencies.md
* Sie hängt von `query_extractor` ab und weist den von diesem zurückgegebenen Wert dem Parameter `q` zu. * Sie deklariert außerdem ein optionales `last_query`-Cookie, ein `str`. * Wenn der Benutzer keine Query `q` übermittelt hat, verwenden wir die zuletzt übermittelte Query, die wir zuvor in einem Cookie gespeichert haben. ## Die Abhängigkeit verwenden
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.2K bytes - Viewed (0)