Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Make your async code sweeter.

Project Description

Caution, this is a 0.x.y version, the public interfaces might break at any time.

Sweetasync

A collection of simple functions, decorators and classes to make your asynchronous python code sweeter.

  • only compatible with 3.5.2+ and 3.6+
  • use Semantic Versioning
  • the documentation is extracted with sphinx from the source’s docstrings: sphinx-build ./ doc
  • to run the test suite, use (adapt accordingly to your installation of python): python3.6 setup.py test

Features

  • remove the boilerplate that comes with setting up and using an event loop with the aiorunner context manager and the @sync decorator for async functions; they also clean up after an exception happens so you don’t get useless warnings about an unclosed event loop and the like
  • easily communicate between coroutines or between coroutines and threads with the Channel and BufferedChannel classes; they can be used as async iterators from coroutines and blocking iterators from threads
  • receive data from multiple channels with a Bundle by iterating on it
  • dispatch events to callbacks and async functions with EventEmitter; it even handles backpressure and errors
  • make your code sweeter with these small functions: aiter, asyncify, and as_await
  • implement synchronization primitives with waiter (such as channels!)

Examples

See the example directory for runnable examples.

Release History

Release History

This version
History Node

0.5.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
sweetasync-0.5.0-py3-none-any.whl (12.7 kB) Copy SHA256 Checksum SHA256 3.6 Wheel Sep 16, 2017
sweetasync-0.5.0.tar.gz (9.0 kB) Copy SHA256 Checksum SHA256 Source Sep 16, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting