typing.AsyncContextManager
Prev: typing.assert_type | Up: typing | Next: typing.AsyncGenerator
Rel: typing.AbstractSet, typing.Annotated, typing.Any, typing.assert_never
Ref: docs.python.org — typing.AsyncContextManager
Tags: #public #python3 #stdlib #typing
Import
import typing
from typing import AsyncContextManager
Signature & Overview
typing.AsyncContextManager(*args, **kwargs)
Deprecated alias to contextlib.AbstractAsyncContextManager.
Usage
from typing import AsyncContextManager
# Deprecated alias for collections.abc.AsyncContextManager (Python 3.9+)
assert AsyncContextManager[str] is not None
Gotchas
- Prefer
contextlib.AbstractAsyncContextManager[T]in Python 3.9+.
REPL Inspect
from typing import AsyncContextManager
help(AsyncContextManager)
Linked from
Related notes
- tuts/python3/stdlib_module/typing/assert_type Linked here; links to this page; shared tags: #stdlib, #typing
- tuts/python3/stdlib_module/typing/AsyncGenerator Linked here; links to this page; shared tags: #stdlib, #typing
- tuts/python3/stdlib_module/typing Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/typing/AbstractSet Linked here; shared tags: #stdlib, #typing
- tuts/python3/stdlib_module/typing/Annotated Linked here; shared tags: #stdlib, #typing
- tuts/python3/stdlib_module/typing/Any Linked here; shared tags: #stdlib, #typing
- tuts/python3/stdlib_module/typing/assert_never Linked here; shared tags: #stdlib, #typing
- tuts/python3/stdlib_module/typing/AsyncIterable shared tags: #stdlib, #typing
- tuts/python3/stdlib_module/typing/AsyncIterator shared tags: #stdlib, #typing
- tuts/python3/stdlib_module/typing/Awaitable shared tags: #stdlib, #typing