Skip to main content

Context manager for asyncio event loop.

Project description

Info:Context loop.
Author: Paweł Zadrożny @pawelzny <pawel.zny@gmail.com>
CI Status Documentation Status PyPI Repository Status Release Status Project Status Supported python versions Supported interpreters License

Features

  • Work with sync and async frameworks
  • Schedule tasks to existing loop or create new one
  • No need to understand how async works
  • No callbacks required
  • Run async tasks whenever and wherever you want

Installation

pip install context-loop

Package: https://pypi.org/project/context-loop/

Documentation

Read full documentation at http://context-loop.readthedocs.io/en/stable/

Quick Example

>>> async def coro():
...     return await something_from_future()
...
>>> import cl.Loop
>>> with cl.Loop(coro(), coro(), coro()) as loop:
...    result = loop.run_until_complete()
...
>>> result
['success', 'success', 'success']

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
context-loop-0.1.1.tar.gz (26.2 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page