- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for Tuple (0.04 sec)
-
fastapi/dependencies/models.py
security_scopes: Optional[List[str]] = None use_cache: bool = True path: Optional[str] = None cache_key: Tuple[Optional[Callable[..., Any]], Tuple[str, ...]] = field(init=False) def __post_init__(self) -> None:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 31 20:19:30 UTC 2024 - 1.5K bytes - Viewed (0) -
tests/test_forms_from_non_typing_sequences.py
def post_form_param_list(items: list = Form()): return items @app.post("/form/python-set") def post_form_param_set(items: set = Form()): return items @app.post("/form/python-tuple") def post_form_param_tuple(items: tuple = Form()): return items client = TestClient(app) def test_python_list_param_as_form(): response = client.post(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 1.2K bytes - Viewed (0) -
fastapi/security/utils.py
from typing import Optional, Tuple def get_authorization_scheme_param( authorization_header_value: Optional[str], ) -> Tuple[str, str]: if not authorization_header_value: return "", "" scheme, _, param = authorization_header_value.partition(" ")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Nov 13 14:26:09 UTC 2022 - 293 bytes - Viewed (0) -
tests/test_typing_python39.py
@needs_py310 def test_typing(): types = { list[int]: [1, 2, 3], dict[str, list[int]]: {"a": [1, 2, 3], "b": [4, 5, 6]}, set[int]: [1, 2, 3], # `set` is converted to `list` tuple[int, ...]: [1, 2, 3], # `tuple` is converted to `list` } for test_type, expect in types.items(): app = FastAPI() @app.post("/", response_model=test_type) def post_endpoint(input: test_type):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 709 bytes - Viewed (0) -
tests/test_dependency_security_overrides.py
from typing import List, Tuple from fastapi import Depends, FastAPI, Security from fastapi.security import SecurityScopes from fastapi.testclient import TestClient app = FastAPI() def get_user(required_scopes: SecurityScopes): return "john", required_scopes.scopes def get_user_override(required_scopes: SecurityScopes): return "alice", required_scopes.scopes def get_data(): return [1, 2, 3]
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jun 14 15:54:46 UTC 2020 - 1.4K bytes - Viewed (0) -
tests/test_invalid_sequence_param.py
from typing import Dict, List, Optional, Tuple import pytest from fastapi import FastAPI, Query from pydantic import BaseModel def test_invalid_sequence(): with pytest.raises(AssertionError): app = FastAPI() class Item(BaseModel): title: str @app.get("/items/") def read_items(q: List[Item] = Query(default=None)): pass # pragma: no cover
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 1.2K bytes - Viewed (0) -
tests/test_invalid_path_param.py
from typing import Dict, List, Tuple import pytest from fastapi import FastAPI from pydantic import BaseModel def test_invalid_sequence(): with pytest.raises(AssertionError): app = FastAPI() class Item(BaseModel): title: str @app.get("/items/{id}") def read_items(id: List[Item]): pass # pragma: no cover def test_invalid_tuple():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Jun 03 17:59:40 UTC 2019 - 1.7K bytes - Viewed (0) -
docs_src/python_types/tutorial007.py
from typing import Set, Tuple def process_items(items_t: Tuple[int, int, str], items_s: Set[bytes]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Apr 11 17:20:32 UTC 2020 - 131 bytes - Viewed (0) -
docs/es/docs/python-types.md
El editor aún sabe que es un `str` y provee soporte para ello. #### Tuples y Sets Harías lo mismo para declarar `tuple`s y `set`s: ```Python hl_lines="1 4" {!../../docs_src/python_types/tutorial007.py!} ``` Esto significa: * La variable `items_t` es un `tuple` con 3 ítems, un `int`, otro `int`, y un `str`. * La variable `items_s` es un `set` y cada uno de sus ítems es de tipo `bytes`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.1K bytes - Viewed (0) -
doc/next/6-stdlib/99-minor/go/types/66626.md
[`MethodSet.Methods`](/pkg/go/types#MethodSet.Methods), [`Named.Methods`](/pkg/go/types#Named.Methods), [`Scope.Children`](/pkg/go/types#Scope.Children), [`Struct.Fields`](/pkg/go/types#Struct.Fields), [`Tuple.Variables`](/pkg/go/types#Tuple.Variables), [`TypeList.Types`](/pkg/go/types#TypeList.Types), [`TypeParamList.TypeParams`](/pkg/go/types#TypeParamList.TypeParams),
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Jul 31 22:54:09 UTC 2024 - 1K bytes - Viewed (0)