betty.contextlib module - Betty documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.contextlib module

Provide context manager utilities.

class betty.contextlib.SynchronizedContextManager

  Bases: `Generic`[`ContextT`]

  Make an asynchronous context manager synchronous.

  Parameters:

    context_manager (`typing.AsyncContextManager`[`typing.TypeVar`(`ContextT`)])

  __init__(context_manager: AsyncContextManager[betty.contextlib.ContextT])
    Parameters:

      context_manager (`typing.AsyncContextManager`[`typing.TypeVar`(`ContextT`)])