- Sort Score
- Result 10 results
- Languages All
Results 771 - 780 of 1,076 for Fstr (0.03 sec)
-
fastapi/middleware/asyncexitstack.py
# Used mainly to close files after the request is done, dependencies are closed # in their own AsyncExitStack class AsyncExitStackMiddleware: def __init__( self, app: ASGIApp, context_name: str = "fastapi_middleware_astack" ) -> None: self.app = app self.context_name = context_name async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Sep 29 03:29:38 UTC 2025 - 637 bytes - Viewed (0) -
docs_src/dependencies/tutorial002_an_py310.py
from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: str | None = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 664 bytes - Viewed (0) -
docs_src/dependencies/tutorial004_an_py39.py
from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons: Annotated[CommonQueryParams, Depends()]):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 660 bytes - Viewed (0) -
src/main/java/jcifs/util/Encdec.java
/** * Encodes a String as UTF-8 bytes. * * @param str the String to encode * @param dst the destination byte array * @param di the starting index in the destination array * @param dlim the maximum index in the destination array * @return the number of bytes written */ public static int enc_utf8(final String str, final byte[] dst, int di, final int dlim) { final int start = di;Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 17.4K bytes - Viewed (0) -
docs/uk/docs/tutorial/response-model.md
{* ../../docs_src/response_model/tutorial004_py310.py hl[9,11:12] *} * `description: Union[str, None] = None` (або `str | None = None` у Python 3.10) має значення за замовчуванням `None`. * `tax: float = 10.5` має значення за замовчуванням `10.5`. * `tags: List[str] = []` має значення за замовчуванням порожній список: `[]`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Jun 24 19:14:01 UTC 2025 - 24.8K bytes - Viewed (0) -
docs/ja/docs/tutorial/path-params.md
## 定義済みの値 *パスパラメータ*を受け取る *path operation* をもち、有効な*パスパラメータ*の値を事前に定義したい場合は、標準のPython <abbr title="Enumeration">`Enum`</abbr> を利用できます。 ### `Enum` クラスの作成 `Enum` をインポートし、 `str` と `Enum` を継承したサブクラスを作成します。 `str` を継承することで、APIドキュメントは値が `文字列` でなければいけないことを知り、正確にレンダリングできるようになります。 そして、固定値のクラス属性を作ります。すると、その値が使用可能な値となります: {* ../../docs_src/path_params/tutorial005.py hl[1,6,7,8,9] *} /// info | 情報
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 10.4K bytes - Viewed (0) -
docs/ru/docs/tutorial/response-model.md
{* ../../docs_src/response_model/tutorial004_py310.py hl[9,11:12] *} * `description: Union[str, None] = None` (или `str | None = None` в Python 3.10) имеет значение по умолчанию `None`. * `tax: float = 10.5` имеет значение по умолчанию `10.5`. * `tags: List[str] = []` имеет значение по умолчанию пустого списка: `[]`. но вы можете захотеть опустить их в результате, если они фактически не были сохранены.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 25.8K bytes - Viewed (0) -
docs/en/docs/tutorial/body.md
* If the parameter is declared to be of the type of a **Pydantic model**, it will be interpreted as a request **body**. /// note FastAPI will know that the value of `q` is not required because of the default value `= None`.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 6.8K bytes - Viewed (0) -
tests/test_computed_fields.py
client = TestClient(app) return client @pytest.mark.parametrize("client", [True, False], indirect=True) @pytest.mark.parametrize("path", ["/", "/responses"]) def test_get(client: TestClient, path: str): response = client.get(path) assert response.status_code == 200, response.text assert response.json() == {"width": 3, "length": 4, "area": 12} @pytest.mark.parametrize("client", [True, False], indirect=True)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 3.2K bytes - Viewed (0) -
docs_src/handling_errors/tutorial004_py39.py
from starlette.exceptions import HTTPException as StarletteHTTPException app = FastAPI() @app.exception_handler(StarletteHTTPException) async def http_exception_handler(request, exc): return PlainTextResponse(str(exc.detail), status_code=exc.status_code) @app.exception_handler(RequestValidationError) async def validation_exception_handler(request, exc: RequestValidationError): message = "Validation errors:"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 920 bytes - Viewed (0)