- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for __iter__ (0.06 sec)
-
tests/test_jsonable_encoder.py
@dataclass class Item: name: str count: int class DictablePerson(Person): def __iter__(self): return ((k, v) for k, v in self.__dict__.items()) class DictablePet(Pet): def __iter__(self): return ((k, v) for k, v in self.__dict__.items()) class Unserializable: def __iter__(self): raise NotImplementedError() @property def __dict__(self):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 9K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an.py
"did not raise WebSocketDisconnect on __enter__" ) # pragma: no cover def test_websocket_invalid_data(): client = TestClient(app) with pytest.raises(WebSocketDisconnect): with client.websocket_connect("/items/foo/ws?q=bar&token=some-token"): pytest.fail( "did not raise WebSocketDisconnect on __enter__"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.6K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_py310.py
"did not raise WebSocketDisconnect on __enter__" ) # pragma: no cover @needs_py310 def test_websocket_invalid_data(app: FastAPI): client = TestClient(app) with pytest.raises(WebSocketDisconnect): with client.websocket_connect("/items/foo/ws?q=bar&token=some-token"): pytest.fail( "did not raise WebSocketDisconnect on __enter__"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an_py310.py
"did not raise WebSocketDisconnect on __enter__" ) # pragma: no cover @needs_py310 def test_websocket_invalid_data(app: FastAPI): client = TestClient(app) with pytest.raises(WebSocketDisconnect): with client.websocket_connect("/items/foo/ws?q=bar&token=some-token"): pytest.fail( "did not raise WebSocketDisconnect on __enter__"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an_py39.py
"did not raise WebSocketDisconnect on __enter__" ) # pragma: no cover @needs_py39 def test_websocket_invalid_data(app: FastAPI): client = TestClient(app) with pytest.raises(WebSocketDisconnect): with client.websocket_connect("/items/foo/ws?q=bar&token=some-token"): pytest.fail( "did not raise WebSocketDisconnect on __enter__"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.9K bytes - Viewed (0) -
fastapi/concurrency.py
# since we're creating a new limiter for each call, any non-zero limit # works (1 is arbitrary) exit_limiter = CapacityLimiter(1) try: yield await run_in_threadpool(cm.__enter__) except Exception as e: ok = bool( await anyio.to_thread.run_sync( cm.__exit__, type(e), e, None, limiter=exit_limiter ) ) if not ok:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Dec 25 17:57:35 UTC 2023 - 1.4K bytes - Viewed (0) -
tests/test_inherited_custom_class.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:13:50 UTC 2024 - 3K bytes - Viewed (0) -
fastapi/exceptions.py
pass class ResponseValidationError(ValidationException): def __init__(self, errors: Sequence[Any], *, body: Any = None) -> None: super().__init__(errors) self.body = body def __str__(self) -> str: message = f"{len(self._errors)} validation errors:\n" for err in self._errors: message += f" {err}\n"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Apr 02 02:48:51 UTC 2024 - 4.9K bytes - Viewed (0) -
docs/em/docs/tutorial/dependencies/dependencies-with-yield.md
๐ฅ ๐ โถ๏ธ โฎ๏ธ **FastAPI** ๐ ๐ช ๐ ๐ถ โซ๏ธ ๐. /// ๐, ๐ ๐ช โ ๐ ๐จโ๐ผ <a href="https://docs.python.org/3/reference/datamodel.html#context-managers" class="external-link" target="_blank">๐ ๐ โฎ๏ธ 2๏ธโฃ ๐ฉโ๐ฌ: `__enter__()` & `__exit__()`</a>. ๐ ๐ช โ๏ธ ๐ซ ๐ **FastAPI** ๐ โฎ๏ธ `yield` โ๏ธ `with` โ๏ธ `async with` ๐ ๐ ๐ ๐ข: ```Python hl_lines="1-9 13" {!../../docs_src/dependencies/tutorial010.py!} ``` /// tip
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.6K bytes - Viewed (0) -
docs/de/docs/tutorial/dependencies/dependencies-with-yield.md
/// In Python kรถnnen Sie Kontextmanager erstellen, indem Sie <a href="https://docs.python.org/3/reference/datamodel.html#context-managers" class="external-link" target="_blank">eine Klasse mit zwei Methoden erzeugen: `__enter__()` und `__exit__()`</a>. Sie kรถnnen solche auch innerhalb von **FastAPI**-Abhรคngigkeiten mit `yield` verwenden, indem Sie `with`- oder `async with`-Anweisungen innerhalb der Abhรคngigkeits-Funktion verwenden:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 13.4K bytes - Viewed (0)