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 Distribution
Built Distributions
Hashes for greenlet-0.4.12-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b56ac981f07b77e72ad5154278b93396d706572ea52c2fce79fee2abfcc8bfa6 |
|
MD5 | f126cc1fe95af9e0a9e5546f62fa7fd5 |
|
BLAKE2b-256 | 508ab46efb910272ae70affaa32fa0054d67263f4e6ea59e77f22b7d672c9f71 |
Hashes for greenlet-0.4.12-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c407aa6adfd4eea1232e81aa9f3cb3d9b955a9891c4819bf9b498c77efba14b |
|
MD5 | 98b77ae90aa6bc253cf2180a5d807ba9 |
|
BLAKE2b-256 | c09549c52a5c354f4115d290cd1210bf71c5aa24481e548ab5a4684a894184fa |
Hashes for greenlet-0.4.12-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5451e1ce06b74a4861576c2db74405a4398c4809a105774550a9e52cfc8c4da |
|
MD5 | e94a98f0968765b803c96dbd93e81ce1 |
|
BLAKE2b-256 | 20eae47c2fff6e91b20c05107411fa25fb93e66bd76ecd27f04e2224e7806f41 |
Hashes for greenlet-0.4.12-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66fa5b101fcf4521138c1a29668074268d938bbb7de739c8faa9f92ea1f05e1f |
|
MD5 | fd371adaef45b6f175a6731f5cbb0d22 |
|
BLAKE2b-256 | e994c1b852239a6c8f72064b45223ad5b22f3d16154dda95a12d626a933deaad |
Hashes for greenlet-0.4.12-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0da1fc809c3bdb93fbacd0f921f461aacd53e554a7b7d4e9953ba09131c4206e |
|
MD5 | 531644867173175e541df82a2090392e |
|
BLAKE2b-256 | 61afa74c0ce5ca08e72c6a9be379360a7f05f78891dcfff018a97e54143db4c9 |
Hashes for greenlet-0.4.12-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e77b708c37b652c7501b9f8f6056b23633c567aaa0d29edfef1c11673c64b949 |
|
MD5 | 611875a1c6e20cf4e2c7ad3202b2c8d3 |
|
BLAKE2b-256 | c3f6c5f9b779d71e0151113a867cf1ac8093106c3484d1c24f0204813569549f |
Hashes for greenlet-0.4.12-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e5e9be157ece49e4f97f3225460caf758ccb00f934fcbc5db34367cc1ff0aee |
|
MD5 | 4e14b85351c1b7f967a5630c860dc2cb |
|
BLAKE2b-256 | c811798f8c12261dec8f504c1794c3d6156439625f6b7f8bd5a490f5d75ec280 |
Hashes for greenlet-0.4.12-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e841e3ece633acae5e2bf6102140a605ffee7d5d4921dca1625c5fdc0f0b3248 |
|
MD5 | 5edc4afed6d395b26d324055472d86f7 |
|
BLAKE2b-256 | 81c5c68f4bfc26b306dbd70e9748f40c2f3ce3e3603fb6ff740ae59c3ffb4bf9 |
Hashes for greenlet-0.4.12-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebae83b6247f83b1e8d887733dfa8046ce6e29d8b3e2a7380256e9de5c6ae55d |
|
MD5 | 567165d4caac752ae7064d33ff2c4ca6 |
|
BLAKE2b-256 | bbaa0c96fe6d7b3a9664ce45aa451cd9489d1c17433aabf99aab4bd7019f7fde |
Hashes for greenlet-0.4.12-cp33-cp33m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d90c709355ed13f16676f84e5a9cd67826a9f5c5143381c21e8fc3100ade1f1 |
|
MD5 | 2ad4f36356a524c1f0cce07a6e9fad79 |
|
BLAKE2b-256 | c1ada60b26b1d7b21ef30571d82be37a2ac58cadf5e05a89e00d4803e7138fda |
Hashes for greenlet-0.4.12-cp33-cp33m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7114b757b4146f4c87a0f00f1e58abd4c4729836679af0fc37266910a4a72eb0 |
|
MD5 | 45124ff43e99756005c1eb25a05ae5dd |
|
BLAKE2b-256 | da5c6920b137a40037a2d2afd4efab1f3173be9ec4bc486bf33c540935f9f441 |
Hashes for greenlet-0.4.12-cp33-cp33m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70b9ff28921f5a3c03df4896ec8c55f5f94c593d7a79abd98b4c5c4a692ba873 |
|
MD5 | 0ae2dd2bc9d65715a68fb5a057ded22f |
|
BLAKE2b-256 | 211bc17679b1bf031234ba3585abef71796beeb2f9d442a7d3c22f4fcf637a6a |
Hashes for greenlet-0.4.12-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21232907c8c26838b16915bd8fbbf82fc70c996073464cc70981dd4a96bc841c |
|
MD5 | 1719cc1f62dd52fd5af1ee4dc38c83d2 |
|
BLAKE2b-256 | fdb8dd04dd0ce13ba7412eac94f6e0456e26e45d0e1df5b8019fb15832d850b0 |
Hashes for greenlet-0.4.12-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76dab055476dd4dabb00a967b4df1990b25542d17eaa40a18f66971d10193e0b |
|
MD5 | 35bc48b22151df6d6e31ab58a8567469 |
|
BLAKE2b-256 | 94a07d6ea454e2fc54c936feb3cf76451a7cd0a87528e1770d12af039279dcae |
Hashes for greenlet-0.4.12-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6803d8c6b235c861c50afddf00c7467ffbcd5ab960d137ff0f9c36f2cb11ee4b |
|
MD5 | 7c3a571f8d7fb40be1b3385017fe3bc9 |
|
BLAKE2b-256 | 5140ed38b10d3814b0ab022b14be25604c327a2e868bf9e5b63deed0ab224bba |
Hashes for greenlet-0.4.12-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 416a3328d7e0a19aa1df3ec09524a109061fd7b80e010ef0dff9f695b4ac5e20 |
|
MD5 | f1297d627bba83b1721cf934adae0a8d |
|
BLAKE2b-256 | 0171b4aa796b5a4381d4e33414aa69d21d1c2cc19f8070d09b2c07ea28493468 |
Hashes for greenlet-0.4.12-cp26-cp26mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2d5103f6cba131e1be660230018e21f276911d2b68b629ead1c5cb5e5472ac7 |
|
MD5 | df4ab17aa87838543c6cbd64546470f8 |
|
BLAKE2b-256 | c5e4555ebb671e4e6edef2e0f33738cce102ce31eb9c7330abff448190251dfb |
Hashes for greenlet-0.4.12-cp26-cp26m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8ab98f8ae25938326dc4c21e3689a933531500ae4f3bfcefe36e3e25fda4dbf |
|
MD5 | d1bd8a8a242f078559fbab726c854b78 |
|
BLAKE2b-256 | 935a08581c4fb63f97d170096b64f44f326472516f3f985720e6d96a4c5e5d1d |
Hashes for greenlet-0.4.12-cp26-cp26m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc339de0e0969de5118d0b62a080a7611e2ba729a90f4a3ad78559c51bc5576d |
|
MD5 | 0b0bd5a280252d41ba9138138f786423 |
|
BLAKE2b-256 | 7dc7b8d6dd240a31d02c937b2bcc6eb9904cc8d856c2ffcf60f5fe90c7af1862 |
Hashes for greenlet-0.4.12-cp26-cp26m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96888e47898a471073b394ea641b7d675c1d054c580dd4a04a382bd34e67d89e |
|
MD5 | adda03ba9b1ce06351276433495fd318 |
|
BLAKE2b-256 | da5274bbc91f8bbdb0c3b475f294bb2b51deafad78efcd69eef2c853bc007c90 |