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.io
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 Distributions
Built Distributions
Hashes for greenlet-0.4.11-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0798eed711b6bb6e6f4d55185c3d342c344abebaaadd4005c22ec8a8802b0255 |
|
MD5 | eb58dae96c68a8a2d6f94b601c977870 |
|
BLAKE2b-256 | 9c8369ffaaef4e6097eb529fc471e974791d352e27301d621db0a3f8faa9bd07 |
Hashes for greenlet-0.4.11-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 227affb7a8b5014223eb6fc347d87ead97e37ed98f7591875686fb30c8c239b4 |
|
MD5 | 4de7d9ab3f8407258efe3f538e998775 |
|
BLAKE2b-256 | 2a72460f21aaabb19d120f560989d82562564cc227b69fc47c54a9e3abb5bf22 |
Hashes for greenlet-0.4.11-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6244b67d64f250d0017c92ea1db2f28c391a7e091b9b119500e66107872bf56 |
|
MD5 | 24b9881e34eb68c2935b0124de6a1a2c |
|
BLAKE2b-256 | c30f6a1545dc8786571524ebc5390852c7e926408252c8049a42264d5fa22a90 |
Hashes for greenlet-0.4.11-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 897b0c78134d6fc3cbaeb248cec6d2ccea7919a7accbd88f6e35cf362c627354 |
|
MD5 | f0b0eaab540dd7279539048d4094f48f |
|
BLAKE2b-256 | 23dd3b6e20fe3f89cd7b4ab85d3fb5f8ef7cb4e06845a41a01873a303bf8c298 |
Hashes for greenlet-0.4.11-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c601d8ab31c662866a7c3fda165589ee28d0bc2b411bb91986f415ff2511998c |
|
MD5 | a4d909f971b29d26cb20f5d2d8ef5745 |
|
BLAKE2b-256 | 90d75f3567df3c5c69c64a4bdee37e9bc169a8daf8eef7b72f1299d9499fdf12 |
Hashes for greenlet-0.4.11-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44feeb58b4a3fb03bb4246817c2f6b761a712e2dcf5984c23cff96c302a05234 |
|
MD5 | f6d9c834f74c99f1f785319d808ebb95 |
|
BLAKE2b-256 | b5316f184751dde08ec1971fc9bd22751b99d84a06c724162c50fb64c1544641 |
Hashes for greenlet-0.4.11-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eceb0e023775dac3339cdeafe9927df0d4cf58be03d77e27decfd6126ea130ca |
|
MD5 | e20bc1c46a825034bdf8770919a94bc4 |
|
BLAKE2b-256 | 37d6675d4969bcf5a6aed112744817b8673e976a19460dea71b4a4402a6efcfa |
Hashes for greenlet-0.4.11-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 171729ebfe7193d916bd2a63b515d56cbf44d34b47dcbab6959600f7d5c79e9f |
|
MD5 | 4c6b9b6edbcce82e8268369c00708aa4 |
|
BLAKE2b-256 | 809e9a51c23fd186beb66f0aea116fb8921cde072dd76073197aeed22bad39cf |
Hashes for greenlet-0.4.11-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2ae60d49f0fc63fc015ce99d34647dc55609d49bfb55e01204ec69322ed70ae |
|
MD5 | 43609a291fff59a601154a98fb0fb24e |
|
BLAKE2b-256 | 4385160289c81e30847ba8de458974708010dd42457b706b8cd6e31e90de2b92 |
Hashes for greenlet-0.4.11-cp33-cp33m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 650ea4ce63c94022a16c17e855754ce3cc81427271a2a74668c01842b10d40aa |
|
MD5 | 296a5e5f724b548eef6a3dc6cb2ac1f0 |
|
BLAKE2b-256 | 60991728354425a9069e8e8154016ba5d994f5ca9b795158b1a39c3e1f393106 |
Hashes for greenlet-0.4.11-cp33-cp33m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ad68c40596eb00e8bc826e7844618d5f6ca08a9e022e4bf5948296d569a8da4 |
|
MD5 | af5f6558d959a34de0bb056e3644735e |
|
BLAKE2b-256 | 6f496dda6ae04016bb6c3e8b5cb6579af65b437d5ee7c14744f51f1f14b758e8 |
Hashes for greenlet-0.4.11-cp33-cp33m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10da720aa8d716348bc24a2a3680228a9ecab9c48efaa17bcf9da932dc33a747 |
|
MD5 | f74226d90cd4aaa8829d4304d5ede1ca |
|
BLAKE2b-256 | 0bef0133203968accf4d00de24ae0480e0ec1b191781b7b6eb4ec072838d4ad9 |
Hashes for greenlet-0.4.11-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a0b6ab8704b184cc5ca11b3fbee7a4abb907bf5950a73b6c28ba216656ae335 |
|
MD5 | 3d7ed0fff45dc9cd1913c2c5f0e2f081 |
|
BLAKE2b-256 | 590b45a4d772d49ff28225a0907422cda756fb9ebf748beed841c5c4e011446d |
Hashes for greenlet-0.4.11-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b945f2b3d530d2cab3eb58027741968a43038e3e7e3475edcd4950124415d70 |
|
MD5 | 8bc6e7832b6a89905d31fc142cba3160 |
|
BLAKE2b-256 | 16e4b4debe4d301dccf58b2fd58c559f1ec20e083f0a8838795026f322022011 |
Hashes for greenlet-0.4.11-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffb8b5772751ef7c6cfbbb34c77d672897617ce8365d06c8a88b5fbf62cde531 |
|
MD5 | 62078442c4d9557bc9f2239472337f60 |
|
BLAKE2b-256 | e7be3ab4ae7e05c00b37705ba6f7b9653c249145c0b702d484b12eac8a2ad909 |
Hashes for greenlet-0.4.11-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97f7b6534ee622737ba8f8792088b4f81a0e4accd0815518cbee7add43fa0fd0 |
|
MD5 | b6f0e14644fff8e35bc59e60d345919e |
|
BLAKE2b-256 | 9ea8524a099826297b4b1e663de48ba322295e23ab912c8a8283f127fb36ff37 |
Hashes for greenlet-0.4.11-cp26-cp26mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 556717eb19fc4e4e736fa668af4d1cb5264ae32f9cbcfccfea6d50b85e64ce80 |
|
MD5 | 9b71e0cb77a1cdb5c61bde6741322813 |
|
BLAKE2b-256 | 0cd0a5e8ed6a5dd912417fc9c17346609d7844d71f75dbd5e23b0a4f242792a7 |
Hashes for greenlet-0.4.11-cp26-cp26m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca1f1f204c704f61e49a469f468a28a7e5eabd8858b8af9bcd4e6c080f7dd72f |
|
MD5 | 90fcbb1a1fc9370f4535ef1355684bae |
|
BLAKE2b-256 | 5c8eb061f0f9d93c980e0c9e31d258ec2789f4eda07c0d367cd98cd089eeee3d |
Hashes for greenlet-0.4.11-cp26-cp26m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 334a68d33863032629d6014704a8deb5cc475c774a33fc489751721e49b6272a |
|
MD5 | 9962556d2dc8be3d62359960d04aead7 |
|
BLAKE2b-256 | 8ede554023fc23bea2e14ddb29bbb3fe6550add02ddffcbdc8b5decff070f3a8 |
Hashes for greenlet-0.4.11-cp26-cp26m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7adb0b558617410c5765324d48b086e59c62dbd11e8197b18e6831a3e5f47f31 |
|
MD5 | b98afa3e7aa71e7c1a9ebff38d850615 |
|
BLAKE2b-256 | bbc210f0610ba6ace7ff5dfb6ee5255277c273b8dce303f990d3118fc9fece4e |