betty.contextlib module¶
Provide context manager utilities.
- class betty.contextlib.SynchronizedContextManager[source]¶
Bases:
Generic
[ContextT
]Make an asynchronous context manager synchronous.
- Parameters:
context_manager (
typing.AsyncContextManager
[typing.TypeVar
(ContextT
),bool
|None
])
- __init__(context_manager: AsyncContextManager[betty.contextlib.ContextT, bool | None])[source]¶
- Parameters:
context_manager (
typing.AsyncContextManager
[typing.TypeVar
(ContextT
),bool
|None
])