- Sort Score
- Num 10 results
- Language All
Results 751 - 760 of 881 for DEF (0.02 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs/de/docs/advanced/stream-data.md
Aber in vielen Fällen würde das Lesen einer Datei oder eines dateiähnlichen Objekts blockieren. /// Um die Event-Loop nicht zu blockieren, können Sie die Pfadoperation-Funktion einfach mit normalem `def` statt `async def` deklarieren, dadurch führt FastAPI sie in einem Threadpool-Worker aus, um die Haupt-Event-Loop nicht zu blockieren. {* ../../docs_src/stream_data/tutorial002_py310.py ln[30:34] hl[31] *} /// tip | TippCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:48:21 GMT 2026 - 6K bytes - Click Count (0) -
docs/pt/docs/tutorial/dependencies/index.md
Você pode utilizar `async def` ou apenas `def`. E você pode declarar dependências utilizando `async def` dentro de *funções de operação de rota* definidas com `def`, ou declarar dependências com `def` e utilizar dentro de *funções de operação de rota* definidas com `async def`, etc. Não faz diferença. O **FastAPI** sabe o que fazer. /// note | Nota
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:43 GMT 2026 - 10.6K bytes - Click Count (0) -
docs_src/behind_a_proxy/tutorial004_py310.py
{"url": "https://prod.example.com", "description": "Production environment"}, ], root_path="/api/v1", root_path_in_servers=False, ) @app.get("/app") def read_main(request: Request):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 437 bytes - Click Count (0) -
docs_src/python_types/tutorial008_py310.py
def process_items(prices: dict[str, float]): for item_name, item_price in prices.items(): print(item_name)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 145 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial013_py310.py
from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items(q: list = Query(default=[])): query_items = {"q": q}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 175 bytes - Click Count (0) -
docs_src/behind_a_proxy/tutorial001_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 189 bytes - Click Count (0) -
docs/pt/docs/advanced/stream-data.md
Mas, em muitos casos, ler um arquivo ou um objeto semelhante a arquivo bloquearia. /// Para evitar bloquear o loop de eventos, você pode simplesmente declarar a função de operação de rota com `def` normal em vez de `async def`. Assim, o FastAPI a executará em um worker de threadpool, evitando bloquear o loop principal. {* ../../docs_src/stream_data/tutorial002_py310.py ln[30:34] hl[31] *} /// tip | DicaCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:13 GMT 2026 - 5.7K bytes - Click Count (0) -
docs_src/path_params/tutorial005_py310.py
from fastapi import FastAPI class ModelName(str, Enum): alexnet = "alexnet" resnet = "resnet" lenet = "lenet" app = FastAPI() @app.get("/models/{model_name}") async def get_model(model_name: ModelName): if model_name is ModelName.alexnet: return {"model_name": model_name, "message": "Deep Learning FTW!"} if model_name.value == "lenet":
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 546 bytes - Click Count (0) -
docs_src/query_params/tutorial002_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 219 bytes - Click Count (0) -
docs/tr/docs/advanced/events.md
Uygulama başlamadan önce veya uygulama kapanırken çalıştırılması gereken event handler’ları (fonksiyonları) tanımlayabilirsiniz. Bu fonksiyonlar `async def` ile veya normal `def` ile tanımlanabilir. ### `startup` eventi { #startup-event } Uygulama başlamadan önce çalıştırılacak bir fonksiyon eklemek için, `"startup"` event’i ile tanımlayın:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 8.3K bytes - Click Count (0)