aiotools

Idiomatic asyncio utilties

MIT License

Downloads
106.7K
Stars
153
Committers
6
aiotools -

Published by achimnol almost 4 years ago

Fixes

  • Fix a potential memory leak with TaskGroup when it's used for long-lived asyncio tasks. (#21)
aiotools -

Published by achimnol almost 4 years ago

Features

  • Add a current_taskgroup context-variable to the taskgroup module (only available for Python 3.7 or later)

Fixes

  • Fix missing auto-import of taskgroup module exports in the aiotools root package.
aiotools -

Published by achimnol about 4 years ago

The first 1.0.0 release.

Available modules:

  • compat: compatibility functions for asyncio API changes, such as get_running_loop, current_task, all_tasks
  • context: a polyfill for contextlib.asynccontextmanager introduced in Python 3.7 for Python 3.6
  • defer: a Golang-like deferred function executor API
  • func: provides async versions of lru_cache and partial
  • iter: provides async version of iter
  • server: a boilerplate reducer for writing scalable multi-process asyncio programs with ease, including all the gory details about signal handling and blocking
  • taskgroup: a port from EdgeDB's taskgroup utility module, which might be included in the future Python stdlib, with some modification such as current_taskgroup context-variable support
  • timer: a simple timer implementation using asyncio.sleep and a while loop, with a bonus class VirtualClock that instantly and deterministically skips over long sleeps during tests
aiotools -

Published by achimnol over 6 years ago