- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 169 for url_lines (0.06 sec)
-
docs/zh/docs/tutorial/dependencies/sub-dependencies.md
在高级使用场景中,如果不想使用「缓存」值,而是为需要在同一请求的每一步操作(多次)中都实际调用依赖项,可以把 `Depends` 的参数 `use_cache` 的值设置为 `False` : ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)): return {"fresh_value": fresh_value} ``` ## 小结 千万别被本章里这些花里胡哨的词藻吓倒了,其实**依赖注入**系统非常简单。 依赖注入无非是与*路径操作函数*一样的函数罢了。
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 3.2K bytes - Viewed (0) -
docs/en/docs/environment-variables.md
You could also create environment variables **outside** of Python, in the terminal (or with any other method), and then **read them in Python**. For example you could have a file `main.py` with: ```Python hl_lines="3" import os name = os.getenv("MY_NAME", "World") print(f"Hello {name} from Python") ``` /// tip
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 8.1K bytes - Viewed (0) -
docs/ko/docs/async.md
`await`가 동작하기 위해, 이것은 비동기를 지원하는 함수 내부에 있어야 합니다. 이를 위해서 함수를 `async def`를 사용해 정의하기만 하면 됩니다: ```Python hl_lines="1" async def get_burgers(number: int): # Do some asynchronous stuff to create the burgers return burgers ``` ...`def`를 사용하는 대신: ```Python hl_lines="2" # This is not asynchronous def get_sequential_burgers(number: int): # Do some sequential stuff to create the burgers
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Aug 31 09:56:21 UTC 2025 - 26.7K bytes - Viewed (0) -
docs/fr/docs/tutorial/body-multiple-params.md
item: Item = Body(embed=True) ``` Voici un exemple complet : {* ../../docs_src/body_multiple_params/tutorial005_an_py310.py hl[17] *} Dans ce cas **FastAPI** attendra un body semblable à : ```JSON hl_lines="2" { "item": { "name": "Foo", "description": "The pretender", "price": 42.0, "tax": 3.2 } } ``` au lieu de : ```JSON {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Nov 09 11:10:17 UTC 2024 - 5.6K bytes - Viewed (0) -
docs/en/docs/tutorial/body-multiple-params.md
```Python item: Item = Body(embed=True) ``` as in: {* ../../docs_src/body_multiple_params/tutorial005_an_py310.py hl[17] *} In this case **FastAPI** will expect a body like: ```JSON hl_lines="2" { "item": { "name": "Foo", "description": "The pretender", "price": 42.0, "tax": 3.2 } } ``` instead of: ```JSON {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Sep 20 12:58:04 UTC 2025 - 4.9K bytes - Viewed (0) -
docs/de/docs/tutorial/body-multiple-params.md
```Python item: Item = Body(embed=True) ``` so wie in: {* ../../docs_src/body_multiple_params/tutorial005_an_py310.py hl[17] *} In diesem Fall erwartet **FastAPI** einen Body wie: ```JSON hl_lines="2" { "item": { "name": "Foo", "description": "The pretender", "price": 42.0, "tax": 3.2 } } ``` statt: ```JSON {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Sep 20 15:10:09 UTC 2025 - 5.5K bytes - Viewed (0) -
docs/zh/docs/index.md
return {"item_id": item_id, "q": q} ``` <details markdown="1"> <summary>或者使用 <code>async def</code>...</summary> 如果你的代码里会出现 `async` / `await`,请使用 `async def`: ```Python hl_lines="9 14" from typing import Union from fastapi import FastAPI app = FastAPI() @app.get("/") async def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}")Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 18.2K bytes - Viewed (0) -
docs/pt/docs/tutorial/body-multiple-params.md
```Python item: Item = Body(embed=True) ``` como em: {* ../../docs_src/body_multiple_params/tutorial005_an_py310.py hl[17] *} Neste caso o **FastAPI** esperará um corpo como: ```JSON hl_lines="2" { "item": { "name": "Foo", "description": "The pretender", "price": 42.0, "tax": 3.2 } } ``` ao invés de: ```JSON {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Nov 12 16:23:57 UTC 2025 - 5.4K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Cache.kt
rawSource.use { val source = rawSource.buffer() val urlLine = source.readUtf8LineStrict() // Choice here is between failing with a correct RuntimeException // or mostly silently with an IOException url = urlLine.toHttpUrlOrNull() ?: throw IOException("Cache corruption for $urlLine").also { Platform.get().log("cache corruption", WARN, it) }Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Oct 03 17:41:45 UTC 2025 - 26.8K bytes - Viewed (0) -
docs/ja/docs/tutorial/response-model.md
しかし、ID`bar`のitemのように、デフォルト値が設定されているモデルのフィールドに値が設定されている場合: ```Python hl_lines="3 5" { "name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2 } ``` それらはレスポンスに含まれます。 #### デフォルト値と同じ値を持つデータ ID`baz`のitemのようにデフォルト値と同じ値を持つデータの場合: ```Python hl_lines="3 5 6" { "name": "Baz", "description": None, "price": 50.2,Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 9K bytes - Viewed (0)