toro
- Info:
Synchronization primitives for Tornado coroutines.
- Author:
A. Jesse Jiryu Davis
Documentation: http://toro.readthedocs.org/
About
A set of locking and synchronizing primitives analogous to those in Python’s threading module or Gevent’s coros, for use with Tornado’s gen.engine.
Dependencies
Tornado >= version 3.0.
Examples
Here’s a basic example (for more see the examples section of the docs):
from tornado import ioloop, gen
import toro
q = toro.JoinableQueue(maxsize=3)
@gen.coroutine
def consumer():
while True:
item = yield q.get()
try:
print 'Doing work on', item
finally:
q.task_done()
@gen.coroutine
def producer():
for item in range(10):
yield q.put(item)
producer()
consumer()
loop = ioloop.IOLoop.instance()
# block until all tasks are done
q.join().add_done_callback(loop.stop)
loop.start()
Documentation
You will need Sphinx and GraphViz installed to generate the documentation. Documentation can be generated like:
$ sphinx-build doc build
Testing
Run python setup.py test in the root directory.
Toro boasts 100% code coverage, including branch-coverage!
Metadata
Release files for toro 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| toro-1.0.1.tar.gz | 57.3 kB | Without provenance | Details |
Release files / toro-1.0.1.tar.gz
| Download URL | toro-1.0.1.tar.gz |
|---|---|
| Size | 57.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5452e477e0d20ec459612a3be9eeed93e8dc5253423b604f73692ce628c6bc4
|
|
BLAKE2b-256 checksum How to use checksums |
94b796cb1ba5cd5a2f82e6411db3e3b3e88ea1c6b7c845c4ac8dd919edd6c074
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for toro 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.