Skip to main content

Utility functions for asyncio which Stephan wished where in the stdlib but aren't.

Project description

akitchensyncio
==============

Utility functions for asyncio which Stephan wished where in the stdlib
but aren't.

wrap_future(f)
--------------

Takes a callable f which returns an awaitable, and returns a callable
which wraps the awaitable in asyncio.ensure_future.

Can also be used as a decorator, especially with coroutine functions:

@wrap_future
async def foo(arg1, arg2):
...

transform_future(f, awaitable)
------------------------------

Apply a function to the result of an awaitable, return a future which
delivers the result.

iawait(awaitable)
-----------------

"Interactive await" -- Run default eventloop until awaitable has
completed. Mainly useful for interactive experimentation.



Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

akitchensyncio-0.1.0.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

akitchensyncio-0.1.0-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page