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.3.win-amd64-py3.4.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | de9cdbf8ab0d5f4b889841bd79bc1dde0b44c8cbbb454f3353e9df73070326ee |
|
MD5 | 4d8833833d6e84ff8bb21df248808a51 |
|
BLAKE2b-256 | c111599da8e08ce4f5b074d8df81f8f5841e6e71b9d44d01f1d91352bf803d7b |
Hashes for greenlet-0.4.3.win-amd64-py3.3.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97afa9d91cddd8e3b342ee9f2eab0b208743df42d76693bcb3ed4bccd42de2cd |
|
MD5 | 7c257a243ef7c59fa695446606dfcb6b |
|
BLAKE2b-256 | 4570f444b64f2672cc3cd4f8d1bb07b25769731309ccb9594ce8d5df94553e8d |
Hashes for greenlet-0.4.3.win-amd64-py2.7.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0be01eb3439640e29896fefde0c0b28e960b39050f0dd9657bf9044f73ade202 |
|
MD5 | 8e21c1682bf2359e1e353f81d07dedde |
|
BLAKE2b-256 | 008b4ccae511e6a9d429ccbf701f1df16a3fe6afbbf75b338ab143754733d831 |
Hashes for greenlet-0.4.3.win-amd64-py2.6.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c51b723183c58cbcce3e864d4a2ed2f7c36bd0510d993fa746de0e437a9604c |
|
MD5 | 1271634fe270082f8407001bfd69dbbe |
|
BLAKE2b-256 | 8951960ea2218eb8f154d76a149608b16af9025869c50873e7308215a13e2361 |
Hashes for greenlet-0.4.3-py3.4-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f58823ea92cbc6d0f06f8137289e65cca43742135f2b5a6831812302188e0fa |
|
MD5 | 612751bebcbd569f9f570fa561105653 |
|
BLAKE2b-256 | 2de74a13d46f2d020fa0d8710ff69d4d2148a37f103cf326f2e84ad3c10ef50b |
Hashes for greenlet-0.4.3-py3.3-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ae1d4ccddac732807a5aa082d3a60dd790c07c09cb1ba94f9495f1d861f3f4d |
|
MD5 | d251543de7c610dc987d229a2243f183 |
|
BLAKE2b-256 | 534b82a7247fe4cff366eb44a3105953d9ddda9dc4e40dfe7edfe935b48ab582 |
Hashes for greenlet-0.4.3-py2.7-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5276ae74e0aedd6eabf4b74f10b0a2ea7c025feec587a9a26e7c4f06936f4d4c |
|
MD5 | 69c3d9531aea6e64f522cc17490e4511 |
|
BLAKE2b-256 | 295fd79105b8df241e7b03f75b9168d33293466e1acb89a90e9941f832be250e |
Hashes for greenlet-0.4.3-py2.6-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | b31c13cc00ec1ad8f4213f5f42a11ec1df64093787ef52b66bad71302cdef3a6 |
|
MD5 | d10491f96d1d9d7c3c93ee936f2e3a91 |
|
BLAKE2b-256 | 4ce197cb3b11a843071cadec1df0a15ee1d5909f8868740a07087ae79d4524c3 |
Hashes for greenlet-0.4.3-cp34-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e704e7e4c1b36ecac353b1589d4306462ab4055a9c3e8d11472e51b34189e09 |
|
MD5 | 7c230f9801ebd4a516b3ddf2d9ddad4c |
|
BLAKE2b-256 | 7aa59979bf66084f033d541b3b1e8958a21b77e978c5157e854f37e01e50fc67 |
Hashes for greenlet-0.4.3-cp34-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2137ab748e02473719d68539ea6773c4f0cd3699fdc272d10f3be3ec6391722c |
|
MD5 | fc026288cc934beb66f7c31f4cf19acd |
|
BLAKE2b-256 | 4ffc6ff75d9b21a53b4fa7bf989a0489a8be40388e1d2fada4f75fd7715ce15a |
Hashes for greenlet-0.4.3-cp33-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cf67bd3e519156f3d96f81edce0852ab1ccd9079628272375ad6dcd7ea7676e |
|
MD5 | ef2da7f27e19eef5971469043f1a32bb |
|
BLAKE2b-256 | f743513f24f92fd5e761b9033ade14dccc600c14cde78afadc244ee266b1e7ea |
Hashes for greenlet-0.4.3-cp33-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dca71a6327c64310e65632ed110ac476420d99e3d6b7f32bb7d3933a3422fa29 |
|
MD5 | 1048cef06dfa103966530681dfdceafa |
|
BLAKE2b-256 | 9510072566b68d21208eee603935ee7f4a30c0a96a407781c6ddf5aecc70d9e2 |
Hashes for greenlet-0.4.3-cp27-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ae05fd690eaeae42b98cda7b6dce975b6e92a6e634fbc58a0560c3608cc04ca |
|
MD5 | f2f08c97215d6a8b0cca903719364716 |
|
BLAKE2b-256 | 15843b56a1fa2ab70a1a93b416778a2973dc9ae388e39caebab118341582e52a |
Hashes for greenlet-0.4.3-cp27-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fd88b81274dd3ac97a1fb0e839318852ea4054686af3f7034bbae2859c49e09 |
|
MD5 | 7705f814ab7f3336f086fcd0b2742cf6 |
|
BLAKE2b-256 | 367fbdd76ca7f20ee15bf58d149dcbdc71d82dbb72ce7be33452f54471f840eb |
Hashes for greenlet-0.4.3-cp26-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2012859f8a6f3e4b6a2383c0f6b6856621929855a521a06d3f0bb4218040847f |
|
MD5 | dbef97f6f483fa4c5388338748648027 |
|
BLAKE2b-256 | b11a14b2f4dab120fc978e4881264f13072a1a0e742baf36a792051068dded41 |
Hashes for greenlet-0.4.3-cp26-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 479e4df016d767ce7c7f7d8c7cfcd042e996d0a36fbd39837f7f4002e0a5a361 |
|
MD5 | 6efc40074518b2b75599947772e1dc09 |
|
BLAKE2b-256 | 5f940c59324d902da2e12c0d58c8fbbf49b28bb6066c4e20ee1062c8e79588b2 |