How to use the aiofiles.threadpool.utils.delegate_to_executor function in aiofiles

To help you get started, we’ve selected a few aiofiles examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Tinche / aiofiles / aiofiles / threadpool / binary.py View on Github external
@delegate_to_executor('close', 'flush', 'isatty', 'read', 'read1', 'readinto',
                      'readline', 'readlines', 'seek', 'seekable', 'tell',
                      'truncate', 'writable', 'write', 'writelines')
@proxy_method_directly('detach', 'fileno', 'readable')
@proxy_property_directly('closed', 'raw')
class AsyncBufferedIOBase(AsyncBase):
    """The asyncio executor version of io.BufferedWriter."""


@delegate_to_executor('peek')
class AsyncBufferedReader(AsyncBufferedIOBase):
    """The asyncio executor version of io.BufferedReader and Random."""


@delegate_to_executor('close', 'flush', 'isatty', 'read', 'readall', 'readinto',
                      'readline', 'readlines', 'seek', 'seekable', 'tell',
                      'truncate', 'writable', 'write', 'writelines')
@proxy_method_directly('fileno', 'readable')
@proxy_property_directly('closed')
class AsyncFileIO(AsyncBase):
    """The asyncio executor version of io.FileIO."""
github Tinche / aiofiles / aiofiles / threadpool / binary.py View on Github external
from ..base import AsyncBase
from .utils import (delegate_to_executor, proxy_property_directly,
                    proxy_method_directly)


@delegate_to_executor('close', 'flush', 'isatty', 'read', 'read1', 'readinto',
                      'readline', 'readlines', 'seek', 'seekable', 'tell',
                      'truncate', 'writable', 'write', 'writelines')
@proxy_method_directly('detach', 'fileno', 'readable')
@proxy_property_directly('closed', 'raw')
class AsyncBufferedIOBase(AsyncBase):
    """The asyncio executor version of io.BufferedWriter."""


@delegate_to_executor('peek')
class AsyncBufferedReader(AsyncBufferedIOBase):
    """The asyncio executor version of io.BufferedReader and Random."""


@delegate_to_executor('close', 'flush', 'isatty', 'read', 'readall', 'readinto',
                      'readline', 'readlines', 'seek', 'seekable', 'tell',
                      'truncate', 'writable', 'write', 'writelines')
github Tinche / aiofiles / aiofiles / threadpool / text.py View on Github external
from .utils import (delegate_to_executor, proxy_property_directly,
                    proxy_method_directly)
from ..base import AsyncBase


@delegate_to_executor('close', 'flush', 'isatty', 'read', 'readable',
                      'readline', 'readlines', 'seek', 'seekable', 'tell',
                      'truncate', 'write', 'writable', 'writelines')
@proxy_method_directly('detach', 'fileno', 'readable')
@proxy_property_directly('buffer', 'closed', 'encoding', 'errors',
                         'line_buffering', 'newlines')
class AsyncTextIOWrapper(AsyncBase):
    """The asyncio executor version of io.TextIOWrapper."""
github Tinche / aiofiles / aiofiles / threadpool / binary.py View on Github external
from ..base import AsyncBase
from .utils import (delegate_to_executor, proxy_property_directly,
                    proxy_method_directly)


@delegate_to_executor('close', 'flush', 'isatty', 'read', 'read1', 'readinto',
                      'readline', 'readlines', 'seek', 'seekable', 'tell',
                      'truncate', 'writable', 'write', 'writelines')
@proxy_method_directly('detach', 'fileno', 'readable')
@proxy_property_directly('closed', 'raw')
class AsyncBufferedIOBase(AsyncBase):
    """The asyncio executor version of io.BufferedWriter."""


@delegate_to_executor('peek')
class AsyncBufferedReader(AsyncBufferedIOBase):
    """The asyncio executor version of io.BufferedReader and Random."""


@delegate_to_executor('close', 'flush', 'isatty', 'read', 'readall', 'readinto',
                      'readline', 'readlines', 'seek', 'seekable', 'tell',
                      'truncate', 'writable', 'write', 'writelines')
@proxy_method_directly('fileno', 'readable')
@proxy_property_directly('closed')
class AsyncFileIO(AsyncBase):
    """The asyncio executor version of io.FileIO."""