- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 61 for tuple (0.02 seconds)
-
tests/test_tuples.py
class ItemGroup(BaseModel): items: list[tuple[str, str]] class Coordinate(BaseModel): x: float y: float @app.post("/model-with-tuple/") def post_model_with_tuple(item_group: ItemGroup): return item_group @app.post("/tuple-of-models/") def post_tuple_of_models(square: tuple[Coordinate, Coordinate]): return square @app.post("/tuple-form/")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 10.8K bytes - Click Count (0) -
tests/benchmarks/test_general_performance.py
def client() -> Iterator[TestClient]: with TestClient(app) as client: yield client def _bench_get(benchmark, client: TestClient, path: str) -> tuple[int, bytes]: warmup = client.get(path) assert warmup.status_code == 200 def do_request() -> tuple[int, bytes]: response = client.get(path) return response.status_code, response.content return benchmark(do_request)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Dec 26 20:40:26 GMT 2025 - 11.1K bytes - Click Count (0) -
fastapi/_compat/v2.py
def validate( self, value: Any, values: dict[str, Any] = {}, # noqa: B006 *, loc: tuple[int | str, ...] = (), ) -> tuple[Any, list[dict[str, Any]]]: try: return ( self._type_adapter.validate_python(value, from_attributes=True), [], )Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 16.7K bytes - Click Count (0) -
docs/en/docs/python-types.md
And still, the editor knows it is a `str`, and provides support for that. #### Tuple and Set { #tuple-and-set } You would do the same to declare `tuple`s and `set`s: {* ../../docs_src/python_types/tutorial007_py310.py hl[1] *} This means: * The variable `items_t` is a `tuple` with 3 items, an `int`, another `int`, and a `str`.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 11K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/suggest/settings/SuggestSettings.java
Created: Fri Apr 17 09:08:13 GMT 2026 - Last Modified: Sat Mar 14 02:35:38 GMT 2026 - 18.7K bytes - Click Count (0) -
fastapi/encoders.py
AnyUrl: str, } def generate_encoders_by_class_tuples( type_encoder_map: dict[Any, Callable[[Any], Any]], ) -> dict[Callable[[Any], Any], tuple[Any, ...]]: encoders_by_class_tuples: dict[Callable[[Any], Any], tuple[Any, ...]] = defaultdict( tuple ) for type_, encoder in type_encoder_map.items(): encoders_by_class_tuples[encoder] += (type_,) return encoders_by_class_tuples
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 10.9K bytes - Click Count (0) -
fastapi/dependencies/utils.py
response=response, dependency_cache=dependency_cache, ) def _validate_value_with_model_field( *, field: ModelField, value: Any, values: dict[str, Any], loc: tuple[str, ...] ) -> tuple[Any, list[Any]]: if value is None: if field.field_info.is_required(): return None, [get_missing_field_error(loc=loc)] else: return deepcopy(field.default), []Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 38.7K bytes - Click Count (3) -
fastapi/openapi/utils.py
*, route: routing.APIRoute, operation_ids: set[str], model_name_map: ModelNameMap, field_mapping: dict[ tuple[ModelField, Literal["validation", "serialization"]], dict[str, Any] ], separate_input_output_schemas: bool = True, ) -> tuple[dict[str, Any], dict[str, Any], dict[str, Any]]: path = {} security_schemes: dict[str, Any] = {} definitions: dict[str, Any] = {}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 25.6K bytes - Click Count (0) -
docs/zh-hant/docs/python-types.md
沒有型別時,幾乎不可能做到這點。 請注意,變數 `item` 是清單 `items` 中的一個元素。 即便如此,編輯器仍然知道它是 `str`,並提供相應的支援。 #### Tuple 與 Set { #tuple-and-set } 你也可以用相同方式來宣告 `tuple` 與 `set`: {* ../../docs_src/python_types/tutorial007_py310.py hl[1] *} 這代表: * 變數 `items_t` 是一個有 3 個項目的 `tuple`,分別是 `int`、`int` 和 `str`。 * 變數 `items_s` 是一個 `set`,而其中每個項目都是 `bytes` 型別。 #### Dict { #dict }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 10.7K bytes - Click Count (0) -
docs/zh/docs/python-types.md
没有类型的话,这几乎是不可能做到的。 注意,变量 `item` 是列表 `items` 中的一个元素。 即便如此,编辑器仍然知道它是 `str`,并为此提供支持。 #### 元组和集合 { #tuple-and-set } 声明 `tuple` 和 `set` 的方式类似: {* ../../docs_src/python_types/tutorial007_py310.py hl[1] *} 这表示: * 变量 `items_t` 是一个含有 3 个元素的 `tuple`,分别是一个 `int`、另一个 `int`,以及一个 `str`。 * 变量 `items_s` 是一个 `set`,其中每个元素的类型是 `bytes`。 #### 字典 { #dict }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 10.6K bytes - Click Count (0)