How to use the apraw.models.helpers.streamable.Streamable function in aPRAW

To help you get started, we’ve selected a few aPRAW 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 Dan6erbond / aPRAW / apraw / models / user.py View on Github external
    @Streamable.streamable
    async def unread(self, *args, **kwargs) -> ListingGenerator:
        return ListingGenerator(self.reddit, API_PATH["message_unread"], *args, **kwargs)
github Dan6erbond / aPRAW / apraw / models / helpers / streamable.py View on Github external
def wrapper(
                    _func: SYNC_OR_ASYNC_ITERABLE):
                return Streamable(_func, max_wait, attribute_name)
github Dan6erbond / aPRAW / apraw / models / helpers / streamable.py View on Github external
def streamable(cls, func: SYNC_OR_ASYNC_ITERABLE = None, max_wait: int = 16, attribute_name: str = "fullname"):
        if func:
            return Streamable(func)
        else:
            def wrapper(
                    _func: SYNC_OR_ASYNC_ITERABLE):
                return Streamable(_func, max_wait, attribute_name)

            return wrapper