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.10-py3.5-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c717e5fbe2bba8cb885031883dcb55c609ffadb84ef395f91915050d3c84343 |
|
MD5 | a870e260044854db7e232b3eee923b51 |
|
BLAKE2b-256 | 644ac84591efe67981d1ba9b4cc9fc003b561ac1c5e2a59960a8df9d93ae6915 |
Hashes for greenlet-0.4.10-py3.4-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | d549332dbb7351301d081db92c27d5f0f3d4803bd92c415c65c30bf98fbe8fb4 |
|
MD5 | 52e60e0aef6bc92e5d8529b165025ef9 |
|
BLAKE2b-256 | a929c7afe95945cef97001dad02c0930beb77dc924b600ea5b0dde5dde49d9bb |
Hashes for greenlet-0.4.10-py3.3-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0cc137ca44e3664d3d97d7bbba8c77f10b411bdbbe2215c5e7f00f7d5c2af08 |
|
MD5 | 8a11c8a908538cb741453f90d71bba2a |
|
BLAKE2b-256 | 9507f9c599e74e552f9ac64426530d562de3d060c4f3f4fb4cd5214009780714 |
Hashes for greenlet-0.4.10-py2.7-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d46c7841477136bcdafa1b343c0849d9886845848bd563279608f0644b2598a |
|
MD5 | b04aab0bd673e8fac5260933edc834cf |
|
BLAKE2b-256 | a7d7c10e63637a81f8a706325ef83700edbe516a1b7aa9b77fdf5d025925b84a |
Hashes for greenlet-0.4.10-py2.6-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9c2e9ded2ee4d6e17c70d52109a97392a64400b1568108825d1cabf26710b35 |
|
MD5 | eed3163bcc96b8c50175aeeb8fcb0107 |
|
BLAKE2b-256 | 9e3523e0925e35ef0c57303a6d17de54044c1cd9cff3b4381e9ec2fcf3450cdc |
Hashes for greenlet-0.4.10-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af5fd9bfac0eef3875d6dc4496ba83ed1fb3f802045409a005d08c1ca98cad22 |
|
MD5 | d154264d9bd7f36b66c9aae13a708319 |
|
BLAKE2b-256 | aaf33a1c4022df5d41b621c8fc78b6cf9e7a2f85cd805a54ff682656442e7bdd |
Hashes for greenlet-0.4.10-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d89f536490e74691e6e1e232c72d112863d8597f894873c3f452e08f21843e4 |
|
MD5 | 6791fc90da94cefac8135abb07da4706 |
|
BLAKE2b-256 | 7ffcb4e82a55691c306ff1dead3fa28bf7a13ff20102bc1bcc658b04a38982b9 |
Hashes for greenlet-0.4.10-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37bcb3e2cf8f67ce6b735b1c50f098c6774f5cf47258de58561e05c639dad356 |
|
MD5 | 4e2a4c7de65a2650b0d713602c40a2cb |
|
BLAKE2b-256 | 1b6d893829eaa00aa6e6c0f9cb06e492f8d6f54c59d5023fad6fb1093e812aba |
Hashes for greenlet-0.4.10-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6428e6086535231d99c1de464c8a8e2face60d255c4c20dd84379760beb9307 |
|
MD5 | f587d03afe704d7b55107535671268f0 |
|
BLAKE2b-256 | bfacf5d2ed53e57f26dae713c355acb09b22862342427c0737fe255bb8364b8e |
Hashes for greenlet-0.4.10-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1017efcb7c2078f081dc9b505f2fff606e683e672ddea9a7dbd332222c6a0a7c |
|
MD5 | 61a52d48345feb8ba0cfea6c84de90c5 |
|
BLAKE2b-256 | 34f05024b2d5adab770083f664b0aa59cb0342b88bd1c4b3485b2979bcfe8133 |
Hashes for greenlet-0.4.10-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9be3514f22439a3fb468aa1b026654f5eafb1b65bd6b0ffe109439ad77adffc |
|
MD5 | 5cd7226f4a93ee5d1d81568b673e2c2e |
|
BLAKE2b-256 | b13d315f8aa0b91c92212447e31693e97b52033bb27a4716b45ba4966d2d132d |
Hashes for greenlet-0.4.10-cp33-cp33m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a8a7402f28f2d7d3829d0e62bb370749bd6e013b6eb40cfe2637b298b2fd25f |
|
MD5 | 92ef1599cd2034bba54f19e5384f42e9 |
|
BLAKE2b-256 | 793938bffa935e7ea792386204e75fdacbc9a4d1ce23c338e939f8fa246c45a3 |
Hashes for greenlet-0.4.10-cp33-cp33m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e5b804e011d605c24662d30cc2e4c8f4896ee4c1d5f2ed5b73accbc3613af5f |
|
MD5 | 72bfce59e582d54e9a9fba5f8da4b7cc |
|
BLAKE2b-256 | 15905a29762281541302ed89ec4e0371c20a0bb0e31fa2520449c67ac25d392a |
Hashes for greenlet-0.4.10-cp33-cp33m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b537b3144ef518586f7935e3671f0f8195056288936dcd200744f285b7e24ae |
|
MD5 | fb1468dad0433aaecd749bee872b47db |
|
BLAKE2b-256 | a9da8e76c236e2d4ee94b479955f4ce6dcc7f5a45d99039cdef64f704782552d |
Hashes for greenlet-0.4.10-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5682764e893e5e6621dd70f11b72993f723953ee3d374650bf9dcea99c04f9c2 |
|
MD5 | eb175d2b16766004abc16f5b23a8ad99 |
|
BLAKE2b-256 | fd4b108108a5a4234b2c7f81a7e9513950caf5146c9b2d47664348dbe9aebaf8 |
Hashes for greenlet-0.4.10-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12efc20be79d6f5a61257758b0d926ea083e0e93ca9a3f07bd6ebfac37327a9b |
|
MD5 | 8e89cd46e8ad539d9d92748605cf3ac1 |
|
BLAKE2b-256 | ccc344d82ed208807daf8cb28bea246aac88851647ea2022c0ae74ff27593669 |
Hashes for greenlet-0.4.10-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f97758ca465fd2cf9b3335881b073b3463558e985078f4d8f27941d9626615ea |
|
MD5 | 14d004e064a33f75d8860b57df3786b6 |
|
BLAKE2b-256 | 92bac5944fa4fd90668060a21241d31fdf4dd266e0f979669d7a16ff00631e1b |
Hashes for greenlet-0.4.10-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b6642acde2889c8cef00ef237e28cfdb1e928ea1c7e08d06d67b4a42a73fcff |
|
MD5 | c2baeb1c46bcf7d9bbe024fc870fa03a |
|
BLAKE2b-256 | 4e8368179c890e14aacc9426a8955269758437e0ee0059fb561bd74ae1e25573 |
Hashes for greenlet-0.4.10-cp26-cp26mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cd07825d98ed834a74821fcd8f1c40d8410b6cf92726dcaaad4b46b440da852 |
|
MD5 | a03dcb1c233f6b070f9ba2eb9cfc0d33 |
|
BLAKE2b-256 | 3f2e57df6e9d7ce7bccdfd655d87df96d3214417c55f137e09cd7cc63e1136ea |
Hashes for greenlet-0.4.10-cp26-cp26m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d32efa985042147e87bc08b6f9bcf5335e0adefefdaf391484c38192e8a707f7 |
|
MD5 | b83da0e48c3c1741e8380e7ff71574af |
|
BLAKE2b-256 | 0492f5012acb4ea4a104a657e5b68fcf74ff76fd848881ec4ff6395037cd0307 |
Hashes for greenlet-0.4.10-cp26-cp26m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0e071a6fd2314447827285d33958b76b98090a78267bd7074f5bc10057db3d5 |
|
MD5 | 1595422d9adb9a51000eac6d332f6cb6 |
|
BLAKE2b-256 | da5fee0122f8b120b17a42528cf517f799ff7add182c3531002309b6d517eda6 |
Hashes for greenlet-0.4.10-cp26-cp26m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f8bf39807016d97778e12c45510addc6996f965a0b40aa7ecbb28a73ed9861c |
|
MD5 | fc26e69d0cd7e4a38f11d7567941d447 |
|
BLAKE2b-256 | aeaffa294a670a9bcd39776e883cd2cbb912efee8c10574c6f053d4e5c7162c4 |