Lightweight in-process concurrent programming
Project description
The greenlet package is a spin-off of Stackless, a version of CPython that supports micro-threads called “tasklets”. Tasklets run pseudo-concurrently (typically in a single or a few OS-level threads) and are synchronized with data exchanges on “channels”.
A “greenlet”, on the other hand, is a still more primitive notion of micro-thread with no implicit scheduling; coroutines, in other words. This is useful when you want to control exactly when your code runs. You can build custom scheduled micro-threads on top of greenlet; however, it seems that greenlets are useful on their own as a way to make advanced control flow structures. For example, we can recreate generators; the difference with Python’s own generators is that our generators can call nested functions and the nested functions can yield values too. Additionally, you don’t need a “yield” keyword. See the example in tests/test_generator.py.
Greenlets are provided as a C extension module for the regular unmodified interpreter.
Greenlets are lightweight coroutines for in-process concurrent programming.
Who is using Greenlet?
There are several libraries that use Greenlet as a more flexible alternative to Python’s built in coroutine support:
Getting Greenlet
The easiest way to get Greenlet is to install it with pip or easy_install:
pip install greenlet easy_install greenlet
Source code archives and windows installers are available on the python package index at https://pypi-hypernode.com/pypi/greenlet
The source code repository is hosted on github: https://github.com/python-greenlet/greenlet
Documentation is available on readthedocs.org: https://greenlet.readthedocs.org
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for greenlet-0.4.4.win-amd64-py3.4.msi
Algorithm | Hash digest | |
---|---|---|
SHA256 | 525e019d16443197a6230065f395077dce942ae36c435138e3d53d187fb594a9 |
|
MD5 | a954e35e3b3da3f36306d8cbfb698fae |
|
BLAKE2b-256 | 695c3e177775c28a495f97212e9aae96583996a9b2f2614391433d2e33a1bd13 |
Hashes for greenlet-0.4.4.win-amd64-py3.4.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | b68eba8ca475357a594f121000850332951d705a5d1018b499f1c1b45aa99353 |
|
MD5 | 1e199cf4411529d23018f471d3f8c6ae |
|
BLAKE2b-256 | e8f8cd6b1822863e4b1eefdf78ea792b6bf8c68bc509a0e9743a59d431e29310 |
Hashes for greenlet-0.4.4.win-amd64-py3.3.msi
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a346b674e8e0a37ab2d2a2f7faf97076432575c79a46d6135febafd5ab2ef34 |
|
MD5 | 0e0d9f4b2d4023b38272085789f76ba2 |
|
BLAKE2b-256 | 1dfbd989522224b5c193359a3e4b4011b0be44231f6fb90f087b41280ac2ea9d |
Hashes for greenlet-0.4.4.win-amd64-py3.3.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | b083b8c16e441a6e8b5f4110941973d12dda086af61f4779174e6da5e81f0b5a |
|
MD5 | 018b9eedb483533a4ae6d9bc843f7b89 |
|
BLAKE2b-256 | 0c973fe42a690a8db52b8bc65b1fccd50fa371dbab4b778e2497657ee74f9d60 |
Hashes for greenlet-0.4.4.win-amd64-py2.7.msi
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7be31e0cade16252c059514ad3ee8b8c1357af0e3d08b4940bf102be75e1f84 |
|
MD5 | 7b87feae0ee5a212b667182409b21876 |
|
BLAKE2b-256 | 4a58db5e77cdb6d33c86bb5ba3b53dc09b0b9303437b8d02c629c840e210c5ea |
Hashes for greenlet-0.4.4.win-amd64-py2.7.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94fe6cb9bf78cd4d97451f9267e9cb6df79a0bf40d279603ed493269fcb8f187 |
|
MD5 | beeb500946e18f9a47e450c5aff495f5 |
|
BLAKE2b-256 | 85b2558ff9e36cdf1f0929fe91ca51a266477746d7ff6f0c9647c00bb65004fc |
Hashes for greenlet-0.4.4.win-amd64-py2.6.msi
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a80e2309e0077bddbe3c02c17a9be0d1007868e66c9319b2dcf9da4f1f9a79d |
|
MD5 | 84813ef6e511465f414951557fc30a4b |
|
BLAKE2b-256 | 6c6e34dbe47568364db8a1bec5622c90623f7d72d608be3ce0da7d87edc049aa |
Hashes for greenlet-0.4.4.win-amd64-py2.6.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 069c613c7bbd5f846e789b549444d48ff0225ace67fce3884056cf02047bba51 |
|
MD5 | 2fcf3529aecd39292dfcfacf6503af72 |
|
BLAKE2b-256 | d8024f6aef96128accb9ce9c71bb7db4fad6ac52739ba8033afd1959a28d658a |
Hashes for greenlet-0.4.4-py3.4-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fd9d8e6dc53ad8554072d3617d62a50198488f0a8b2931799a6b4553891ca7e |
|
MD5 | 07309b48b107cfd30e94f7f5a32eb709 |
|
BLAKE2b-256 | 488a01298f1e85aa1bee1105acb37dba336ed427e479a8e484a8e6fc94efc518 |
Hashes for greenlet-0.4.4-py3.3-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | f67df90b71f3c96139b8c3d6b7cd31e681622c95c08cac0c729bc06244bec50b |
|
MD5 | 5aa89c800bfe133187b5c8d1f941b6c3 |
|
BLAKE2b-256 | e3997c049aa1ba17494c97510a2a6d8850c21a6d329086b81e074e1e71bfa6fa |
Hashes for greenlet-0.4.4-py2.7-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 519c62b197e38b4a3abf49b1c104031e390f606db9ac8aa88329b0db98c643b3 |
|
MD5 | e6cacdaf033082a45cc620024d9d456d |
|
BLAKE2b-256 | 5c3835d0ab157c7c37d1652cfbf669f7f61aff2c7356f383a05e295562a3d56c |
Hashes for greenlet-0.4.4-py2.6-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6af8f322dcbbf047529d268e9ab32b461878d88653f496079db266b93e06cfe0 |
|
MD5 | 5d5c41400088470f1453e09b35daee89 |
|
BLAKE2b-256 | 83cbcb5bd538f9af74316723083ebd43f5b37bb55417ff9424160726daf689d2 |
Hashes for greenlet-0.4.4-cp34-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fd0ede6f81cea31afd9511a4dfdd0f8896343e1f4f003dc7520b2e7c78762d8 |
|
MD5 | 47dee8c55db020da7388c1fb9405d887 |
|
BLAKE2b-256 | 7258263b821c3555c640d80f8e46d3889503241ce4d077800b4c0bfdedc3e644 |
Hashes for greenlet-0.4.4-cp34-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd8741af51df858da5081b66e5594be3ca8be91834be64936990fdf529f6a8d9 |
|
MD5 | ff320d4ae21aaeb5185afe73b23fe61e |
|
BLAKE2b-256 | 47c07e76ebe0084c2e0b8beae35997945db2162589c915cfc9003e00dfb38dac |
Hashes for greenlet-0.4.4-cp33-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7be31b34e206a332de37108a308d97aee76cb2ed4d23594ebb27d6419a64cb9b |
|
MD5 | 61c92634fbd639764056b1f626602ae3 |
|
BLAKE2b-256 | 456169e4e8cb1fd5201b58a75605cee6438f74a8835248a260a2a17def52841e |
Hashes for greenlet-0.4.4-cp33-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97951d652717504e0f1620166639aa7ac7e13ddce313aa212b73fb23efdf4165 |
|
MD5 | c0508b148a89b28406826fb1ff1310a3 |
|
BLAKE2b-256 | 075524596fca3251ca2bd0d3e119f179d655aba302dca209cdc9021306f07fac |
Hashes for greenlet-0.4.4-cp27-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1df38e01def107fe474eb5b4f9faa4f554e8746186b135c149cc0337fd30a237 |
|
MD5 | 72ef6d525b407daa43ed2d4f7405c7df |
|
BLAKE2b-256 | 0717067c11ffeefc19a0b60212425f801508e7c1f9c53c944e392cd41a45326e |
Hashes for greenlet-0.4.4-cp27-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f80565ef0fb1bd5ea21064d60b311a3a7b244d5884d13812993a5a6bd0009110 |
|
MD5 | 3d065630a1e09f7f5c2bfe29fd6ed9b4 |
|
BLAKE2b-256 | 31fb32a323769c0ff5292882c53c5a86ffeab13a6e3ef26de8bdf3846ac771eb |
Hashes for greenlet-0.4.4-cp26-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 483dd6c94132f2f37d36adf5da9b0c0fa14d5da90bf287dcf6a3e87283e36d88 |
|
MD5 | 440c663ac5b16752b72803b8a3624b1c |
|
BLAKE2b-256 | 1ebbc26498b446411b9952be56d22dc233756571eb6f11818c821d19c09e1a61 |
Hashes for greenlet-0.4.4-cp26-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3cb9633e54a1b60eb649843022ad84e2d5e89ee7f66c15e9e5f814d13b0c9ea |
|
MD5 | 4a040ebe01d6f040193bc29868dc863b |
|
BLAKE2b-256 | f14cf6a3129bfe59a48021c529351ffccb3eff5a031fc557269fcd13a768ef1b |