- Sort Score
- Result 10 results
- Languages All
Results 211 - 220 of 329 for __exit__ (0.05 sec)
-
docs_src/dependencies/tutorial004_an_py39.py
from typing import Annotated, Union 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/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 660 bytes - Viewed (0) -
docs/zh/docs/tutorial/bigger-applications.md
/// ## 一个文件结构示例 假设你的文件结构如下: ``` . ├── app │ ├── __init__.py │ ├── main.py │ ├── dependencies.py │ └── routers │ │ ├── __init__.py │ │ ├── items.py │ │ └── users.py │ └── internal │ ├── __init__.py │ └── admin.py ``` /// tip 上面有几个 `__init__.py` 文件:每个目录或子目录中都有一个。 这就是能将代码从一个文件导入到另一个文件的原因。 例如,在 `app/main.py` 中,你可以有如下一行: ```
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun May 11 13:37:26 UTC 2025 - 18.4K bytes - Viewed (0) -
fastapi/security/http.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 13.2K bytes - Viewed (0) -
docs_src/dependencies/tutorial002_an_py310.py
from typing import Annotated 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) -
tests/test_dependency_yield_scope_websockets.py
from fastapi.exceptions import FastAPIError from fastapi.testclient import TestClient global_context: ContextVar[dict[str, Any]] = ContextVar("global_context", default={}) # noqa: B039 class Session: def __init__(self) -> None: self.open = True async def dep_session() -> Any: s = Session() yield s s.open = False global_state = global_context.get() global_state["session_closed"] = True
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 6K bytes - Viewed (0) -
tests/test_jsonable_encoder.py
from fastapi.exceptions import PydanticV1NotSupportedError from pydantic import BaseModel, Field, ValidationError class Person: def __init__(self, name: str): self.name = name class Pet: def __init__(self, owner: Person, name: str): self.owner = owner self.name = name @dataclass class Item: name: str count: intRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 9.2K bytes - Viewed (0) -
buildscripts/verify-build.sh
rm -f "$WORK_DIR/dist-minio-9000.log" "$WORK_DIR/dist-minio-9001.log" "$WORK_DIR/dist-minio-9002.log" "$WORK_DIR/dist-minio-9003.log" return "$rv" } function purge() { rm -rf "$1" } function __init__() { echo "Initializing environment" mkdir -p "$WORK_DIR" mkdir -p "$MINIO_CONFIG_DIR" mkdir -p "$MINT_DATA_DIR" MC_BUILD_DIR="mc-$RANDOM"
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri May 24 19:28:51 UTC 2024 - 6.7K bytes - Viewed (0) -
docs/es/docs/tutorial/bigger-applications.md
Digamos que tienes una estructura de archivos como esta: ``` . ├── app │ ├── __init__.py │ ├── main.py │ ├── dependencies.py │ └── routers │ │ ├── __init__.py │ │ ├── items.py │ │ └── users.py │ └── internal │ ├── __init__.py │ └── admin.py ``` /// tip | Consejo Hay varios archivos `__init__.py`: uno en cada directorio o subdirectorio.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 19.6K bytes - Viewed (0) -
docs/pt/docs/tutorial/bigger-applications.md
Digamos que você tenha uma estrutura de arquivos como esta: ``` . ├── app │ ├── __init__.py │ ├── main.py │ ├── dependencies.py │ └── routers │ │ ├── __init__.py │ │ ├── items.py │ │ └── users.py │ └── internal │ ├── __init__.py │ └── admin.py ``` /// tip | Dica Existem vários arquivos `__init__.py` presentes em cada diretório ou subdiretório.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 20:32:40 UTC 2025 - 19.7K bytes - Viewed (0) -
docs/ru/docs/how-to/custom-docs-ui-assets.md
Допустим, структура файлов вашего проекта выглядит так: ``` . ├── app │ ├── __init__.py │ ├── main.py ``` Теперь создайте директорию для хранения этих статических файлов. Новая структура файлов может выглядеть так: ``` . ├── app │ ├── __init__.py │ ├── main.py └── static/ ``` ### Скачайте файлы { #download-the-files }Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 12.8K bytes - Viewed (0)