- Sort Score
- Num 10 results
- Language All
Results 661 - 670 of 1,542 for FastApi (0.06 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs_src/websockets/tutorial002_py39.py
from typing import Union from fastapi import ( Cookie, Depends, FastAPI, Query, WebSocket, WebSocketException, status, ) from fastapi.responses import HTMLResponse app = FastAPI() html = """ <!DOCTYPE html> <html> <head> <title>Chat</title> </head> <body> <h1>WebSocket Chat</h1> <form action="" onsubmit="sendMessage(event)">
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 2.8K bytes - Click Count (0) -
docs/ja/docs/tutorial/handling-errors.md
"size": "XL" } } ``` #### FastAPIの`HTTPException`とStarletteの`HTTPException` **FastAPI**は独自の`HTTPException`を持っています。 また、 **FastAPI**のエラークラス`HTTPException`はStarletteのエラークラス`HTTPException`を継承しています。 唯一の違いは、**FastAPI** の`HTTPException`はレスポンスに含まれるヘッダを追加できることです。 これはOAuth 2.0といくつかのセキュリティユーティリティのために内部的に必要とされ、使用されています。 そのため、コード内では通常通り **FastAPI** の`HTTPException`を発生させ続けることができます。
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 17:48:49 GMT 2025 - 11.6K bytes - Click Count (0) -
docs_src/background_tasks/tutorial002_an_py39.py
from typing import Annotated, Union from fastapi import BackgroundTasks, Depends, FastAPI app = FastAPI() def write_log(message: str): with open("log.txt", mode="a") as log: 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
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 696 bytes - Click Count (0) -
docs_src/body_multiple_params/tutorial004_py39.py
from typing import Union from fastapi import Body, FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None class User(BaseModel): username: str full_name: Union[str, None] = None @app.put("/items/{item_id}") async def update_item( *, item_id: int,
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 653 bytes - Click Count (0) -
docs_src/dependencies/tutorial008c_an_py39.py
from typing import Annotated from fastapi import Depends, FastAPI, HTTPException app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney 😱") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]): if item_id == "portal-gun":
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 700 bytes - Click Count (0) -
docs/zh/docs/deployment/versions.md
添加测试后,你可以将 **FastAPI** 版本升级到更新版本,并通过运行测试来确保所有代码都能正常工作。 如果一切正常,或者在进行必要的更改之后,并且所有测试都通过了,那么你可以将`fastapi`固定到新的版本。 ## 关于Starlette 你不应该固定`starlette`的版本。 不同版本的 **FastAPI** 将使用特定的较新版本的 Starlette。 因此,**FastAPI** 自己可以使用正确的 Starlette 版本。 ## 关于 Pydantic Pydantic 包含针对 **FastAPI** 的测试及其自己的测试,因此 Pydantic 的新版本(`1.0.0`以上)始终与 FastAPI 兼容。 你可以将 Pydantic 固定到适合你的`1.0.0`以上和`2.0.0`以下的任何版本。 例如: ````txt
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Aug 06 04:48:30 GMT 2024 - 3.1K bytes - Click Count (0) -
docs/de/docs/tutorial/index.md
Wenn Sie diese optionalen Abhängigkeiten nicht haben möchten, können Sie stattdessen `pip install fastapi` installieren. Wenn Sie die Standard-Abhängigkeiten, aber ohne das `fastapi-cloud-cli` installieren möchten, können Sie mit `pip install "fastapi[standard-no-fastapi-cloud-cli]"` installieren. /// ## Handbuch für fortgeschrittene Benutzer { #advanced-user-guide }
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Sep 20 15:10:09 GMT 2025 - 5.5K bytes - Click Count (0) -
docs/ru/docs/tutorial/path-params.md
```JSON {"item_id":3} ``` /// check | Заметка Обратите внимание на значение `3`, которое получила (и вернула) функция. Это целочисленный Python `int`, а не строка `"3"`. Используя такое объявление типов, **FastAPI** выполняет автоматический <abbr title="преобразование строк из HTTP-запроса в типы данных Python">"парсинг"</abbr> запросов. /// ## Валидация данных { #data-validation }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 14.2K bytes - Click Count (0) -
docs_src/response_model/tutorial005_py310.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float = 10.5 items = { "foo": {"name": "Foo", "price": 50.2}, "bar": {"name": "Bar", "description": "The Bar fighters", "price": 62, "tax": 20.2}, "baz": { "name": "Baz", "description": "There goes my baz",
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 816 bytes - Click Count (0) -
docs_src/response_model/tutorial005_py39.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: float = 10.5 items = { "foo": {"name": "Foo", "price": 50.2}, "bar": {"name": "Bar", "description": "The Bar fighters", "price": 62, "tax": 20.2}, "baz": { "name": "Baz",
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 848 bytes - Click Count (0)