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 http://pypi.python.org/pypi/greenlet
The source code repository is hosted on github: https://github.com/python-greenlet/greenlet
The master branch - i.e. the development version - can be installed directly by running one of the following:
pip install greenlet==dev easy_install greenlet==dev
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
File details
Details for the file greenlet-0.3.2.zip
.
File metadata
- Download URL: greenlet-0.3.2.zip
- Upload date:
- Size: 50.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43919c9360c2b3a2419143036e7cfa7042cf25296e7f1f18456cdfd815b5955c |
|
MD5 | 96b99f659d466ce1c5b3d72bc25dddac |
|
BLAKE2b-256 | 4aa3df6960827911eb281a9b86b12785e22c88e7d7df55e68ff4eeef0904a449 |
File details
Details for the file greenlet-0.3.2.win32-py3.2.exe
.
File metadata
- Download URL: greenlet-0.3.2.win32-py3.2.exe
- Upload date:
- Size: 210.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d83ba5f0ece5056752dde07ec3b4e8c699e897f11ff0917fd759f3e9071d88fe |
|
MD5 | db2d46d04270fcbd591273fd0ce21500 |
|
BLAKE2b-256 | 175bcba06032ab9e92aa15f3d38fcc8874c176e36ffae29fad38f0351a9c2d61 |
File details
Details for the file greenlet-0.3.2.win32-py3.1.exe
.
File metadata
- Download URL: greenlet-0.3.2.win32-py3.1.exe
- Upload date:
- Size: 210.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a13615da046c71a58779428f8838c5303b454caa88c951497a785b6c80f8bf9 |
|
MD5 | cc31b682fcb774718e346aac26474c2c |
|
BLAKE2b-256 | 7e6ddead70c891e534fb1178e45cfa057b49e6dfe9e5614a560ad931fe554485 |
File details
Details for the file greenlet-0.3.2.win32-py3.0.exe
.
File metadata
- Download URL: greenlet-0.3.2.win32-py3.0.exe
- Upload date:
- Size: 211.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32fadaeccad2fcdcfd0c4123f7bb887f5ce8b71415bd232c61337c275eecbb3f |
|
MD5 | 1f7e8185cd7da15b14a08ac4470ecff4 |
|
BLAKE2b-256 | 1a765f46aa0574e263d8c4939815d272633f2355980e2e2a1327c657856146a4 |
File details
Details for the file greenlet-0.3.2.win32-py2.7.exe
.
File metadata
- Download URL: greenlet-0.3.2.win32-py2.7.exe
- Upload date:
- Size: 211.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6018550bc7d8c1d1078aa160489b804006f04d6753d8399b9cfce6a05a6d82e7 |
|
MD5 | 7e5cc074f6eede39a2b833ed772f1b41 |
|
BLAKE2b-256 | 129c4b8c713a6d3ef3daf069a7669a4fe404d7708612654a1e15bb3dc3ddec73 |
File details
Details for the file greenlet-0.3.2.win32-py2.6.exe
.
File metadata
- Download URL: greenlet-0.3.2.win32-py2.6.exe
- Upload date:
- Size: 211.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f28df0449ec4a799930127bf340671e74d772770f101e582f4336a5b61a7923 |
|
MD5 | 28224e486032d0e5754af9368576f4c1 |
|
BLAKE2b-256 | b6978b20b456dc479298d00bea39e100cc573dc06f813e28d67adaabed21cabc |
File details
Details for the file greenlet-0.3.2.win32-py2.5.exe
.
File metadata
- Download URL: greenlet-0.3.2.win32-py2.5.exe
- Upload date:
- Size: 74.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb935b24824bbfa4e046740d25c1b8b3fc937dc5a9492e66839db33e0c4bc797 |
|
MD5 | 944b9e66d07cbc62d6a6f8e8756b037b |
|
BLAKE2b-256 | 2f093a1ce6c39c3d4b7db0ad3c9cc6644fa7a9769a4dbef8785401c6566b6a4c |
File details
Details for the file greenlet-0.3.2.win32-py2.4.exe
.
File metadata
- Download URL: greenlet-0.3.2.win32-py2.4.exe
- Upload date:
- Size: 74.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bac485e79035e9d82745651c5fa37dd98c786e1e2452cff3c7beb1f18f32ebfa |
|
MD5 | 8bbcd5a89d80211cb2f339769d732e70 |
|
BLAKE2b-256 | ebb319bbec14ba8d4c50f4a47a844cf87bec1617ef85b4e3c6e2d08c7ce4852a |
File details
Details for the file greenlet-0.3.2-py3.2-win32.egg
.
File metadata
- Download URL: greenlet-0.3.2-py3.2-win32.egg
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a07f8c57a2c00dd18f89f53de7f0457578455fef1050549c6d6bf85e20c3b07 |
|
MD5 | d5bc7f989ea7a72f0daf68d1e6e25c07 |
|
BLAKE2b-256 | 4341412b5dde765e8901a1ba6ca14c842f40f8b62251de446a83940b3ec8ddee |
File details
Details for the file greenlet-0.3.2-py3.1-win32.egg
.
File metadata
- Download URL: greenlet-0.3.2-py3.1-win32.egg
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f936f05298d11f8f4c5af560fc1bd1a7d90c279872050c9e0a2cb3ca3ef0a087 |
|
MD5 | 7f8c1df9c23ab671900106f1befa9774 |
|
BLAKE2b-256 | 3f7772186b3e20bbb45c1da9cc585f2590e11bf119e395b28fa178ab9f6ae5cb |
File details
Details for the file greenlet-0.3.2-py3.0-win32.egg
.
File metadata
- Download URL: greenlet-0.3.2-py3.0-win32.egg
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bca4f1cf41dea9856a8aace30fd7901d4b7b169b04346dd0d341a754425d0081 |
|
MD5 | 8fb2e0433a64601539ff550d0ed031ea |
|
BLAKE2b-256 | 54e4318aee830b51fd254f178f028e4f95e6e583dabfecfba27936e85c8f4cd1 |
File details
Details for the file greenlet-0.3.2-py2.7-win32.egg
.
File metadata
- Download URL: greenlet-0.3.2-py2.7-win32.egg
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26114a9cda61ee8e8fc87b9f66075c54b62e5fe162ce80ff84d3002712995a76 |
|
MD5 | e107fd9cba9fb79b94680367d29cc787 |
|
BLAKE2b-256 | 88f5986608f910af2c1363736108cb0f1d71d3b44a2037ed90b0640afa7b1367 |
File details
Details for the file greenlet-0.3.2-py2.6-win32.egg
.
File metadata
- Download URL: greenlet-0.3.2-py2.6-win32.egg
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7505f57c3d40835278549c9e813b29642530e42ea959845f34cf8bb9f16c1af |
|
MD5 | 2530c24bf0ea9dd3d890c0a244f2dc7f |
|
BLAKE2b-256 | 097db4e1b47a39054e4b5ff5e8897a2bdab2e30bc330918c0efd9f8a429a1e30 |
File details
Details for the file greenlet-0.3.2-py2.5-win32.egg
.
File metadata
- Download URL: greenlet-0.3.2-py2.5-win32.egg
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e1a8be78f8c98ba57840734e9471bb57fde961d02d5c555c10ade9474689698 |
|
MD5 | 9db1630d5e1d93731b16c92c4e4039e5 |
|
BLAKE2b-256 | 13dfb9184e47491c295f9cd6073ea6e22254229b276066b443c569ce001b3b40 |
File details
Details for the file greenlet-0.3.2-py2.4-win32.egg
.
File metadata
- Download URL: greenlet-0.3.2-py2.4-win32.egg
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec3d8705c16bca829894910ed0dccd1bda0df2f6d6238795bf4156affd202386 |
|
MD5 | 9b63f92393269a4e161d640c0c16e76b |
|
BLAKE2b-256 | 76f6556235fac43a9bc2c840b6eecd982d322297860a6578e167260278007229 |