Skip to content

Async/Await Support for Native Coroutines #1734

Description

@Kobiwizards

Why: The asyncio.py module exists but has limited support. The TODO comments mention missing features. Users working with async for and async with need better integration.

Description:
When iterating over async iterators or awaiting multiple async tasks, there's no clean way to show progress. tqdm should provide decorators and context managers that work with native coroutines and async generators.

Example use case:

python
from tqdm.asyncio import tqdm, tqdm_as_completed

async for item in tqdm(async_iterable, total=100):
await process(item)

Or for gathering many tasks

for task in tqdm_as_completed(tasks, total=len(tasks)):
result = await task

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions