Lightweight in-process concurrent programming
Project description
Greenlets are lightweight coroutines for in-process concurrent programming.
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 test_generator.py).
Greenlets are provided as a C extension module for the regular unmodified interpreter.
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:
pip install greenlet
Source code archives and binary distributions are vailable on the python package index at https://pypi-hypernode.com/project/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-1.0a1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f49710d7fdf16e359df9071a9552b03e72129b19423f9bf88393d747e89d2645 |
|
MD5 | dcbd510574859634d901d9adb467e11a |
|
BLAKE2b-256 | a07e9dd6545939b77915eaa1916ea963b7a2b7aa0b80f5e943f364b586865c16 |
Hashes for greenlet-1.0a1-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2e835dddba0acdb4c65f28d437733f781abbe9f5248681566aff46226b44662 |
|
MD5 | 514fe24556c9567e0b6fbafdf01dd5c2 |
|
BLAKE2b-256 | 3cf53f0c3286d7b0681e767807ed3e81a86466191ad1c8bd6b6a6b33ce0dbddc |
Hashes for greenlet-1.0a1-cp39-cp39-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 411a2973a073e1a7460e974182df92f12ee11b6b73c0398002bd11faf69bc7f5 |
|
MD5 | 2e81d66ee2b68ef6310793caf25f04b2 |
|
BLAKE2b-256 | 64311891a63d122cb4f25cf7b11f3e066c984614673568d654ffababd42a5437 |
Hashes for greenlet-1.0a1-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1f85582bd1d9c6de8db2f840f4f9514d548fe381fe97fab64601bc5e9fafc6d |
|
MD5 | 55155de30d0fd77a43a64308bd49fffd |
|
BLAKE2b-256 | 4645df6f97befd6241b12ddfd5ae9c45bd967aa26104a2a58911c8642164e0d4 |
Hashes for greenlet-1.0a1-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca406d22f14344e8fe3fb55b375a24550efb0104f3b26a5ee8826071f78b94c3 |
|
MD5 | 698a167fb9c27cb5595162962718ac81 |
|
BLAKE2b-256 | ff571dda499dd594c14fb954b73f7594d04db558936af2bc4565224dd277a8b1 |
Hashes for greenlet-1.0a1-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9249796c5ddc277be194c9da9e0a3e9bf3d11f6e2497f13f2ee65ac38a824714 |
|
MD5 | 8ab326dd4ea332e1605b22e2489c5ce3 |
|
BLAKE2b-256 | a7997a38a3e964785389615f48b266ad3a88e1969ba604403f93fbd5e5bebb21 |
Hashes for greenlet-1.0a1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c260b4f84b4784baf766dd855abd6333c2f42fe30f4634da213170ccc922f899 |
|
MD5 | 00bf606049bc217f65d44f0c3a48bce2 |
|
BLAKE2b-256 | 17821079ffddee802e2b2ce32a96d8df97271d55eb849040426dcc62f8a0bc8d |
Hashes for greenlet-1.0a1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9f5fa4b4b8e8e9d7023cec478edaa2f02e23000d017dbccd04de3522ea1b009 |
|
MD5 | dfdf69bf5c43b219073225ffbf612129 |
|
BLAKE2b-256 | b92da4c5a57bc8722454384d0a3e4ee503a8b6085cd333673a369e1d7b917b72 |
Hashes for greenlet-1.0a1-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbc19e946069b6cd2a9d235e20b140c961fce52d0d9b9bfe03ddbf45dba7e7fe |
|
MD5 | ea1cc4bd97d52ab3f493f9e7bf2f6bdc |
|
BLAKE2b-256 | 1792eb0228bfac9f07049a2d946d78aeeb5fca59dc8297fb0e0f17f4fa14514b |
Hashes for greenlet-1.0a1-cp38-cp38-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55f28936f498ca95578db6fed5048e01dcbdb3d6db6e3c2d9ca389d5efb89467 |
|
MD5 | 91fdf1fc1b047497b17c894d6fc4856a |
|
BLAKE2b-256 | f9f4401a1fa2ff686abbcd3eaecf774dc5ef119b5ec38d7d00735d188256243b |
Hashes for greenlet-1.0a1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 847fb8265cef62839018b2b20f96237877a0093d8d9ec02e5afb6edbeda4289f |
|
MD5 | 003d1530c9370d52d9a6c683bd9af0a5 |
|
BLAKE2b-256 | 303f432f4830a21daf329c907a677d79511a54d4374a20aa3cf1e4e576206e25 |
Hashes for greenlet-1.0a1-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec441663e2de5eec487e29bad9324e8239e557096b4f88554366c78e7b0c33ad |
|
MD5 | b51f948167dbebaf299a082325d380fd |
|
BLAKE2b-256 | d809cb121a7d04e900f1dbe1cfe6a723be55456a48516ae082862e96d1f6e865 |
Hashes for greenlet-1.0a1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6177b9b299c83b5a23677156c6773875e8bcd4c99cf707602eb92cc9efb5211 |
|
MD5 | 381bef70b60ac09e10f4dcd339c9bc90 |
|
BLAKE2b-256 | aa746e93515873829a8d894863bbae1d709405bdd50d66fdf239480cc9db0598 |
Hashes for greenlet-1.0a1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | addfacb08e42398b2d47dc3d2539b933fac6aff34f06d00bcb48021da976a093 |
|
MD5 | 4a59b69edb1ca51eb9aeb85f55d1c0a1 |
|
BLAKE2b-256 | 8a76e878556c9216252525ade9fdba08ef8d9d38dd558b067ffda94523a76067 |
Hashes for greenlet-1.0a1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbd7e63d8e04e9f5f0438bd84b16b5dc907072e4d10cc7ef973a66aad5f17b46 |
|
MD5 | 6e52591a8cecfdb067d626495ec78107 |
|
BLAKE2b-256 | e3dd5117c979c7464f10d825939f743316a691ba891046038a53c984c1147f5a |
Hashes for greenlet-1.0a1-cp37-cp37m-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b0a7e95110319819eab7c350f8a4a8308ecb27a9c558cbf78fe3468c3c884bc |
|
MD5 | 0c84c810ce533ec1ae35b1772231643d |
|
BLAKE2b-256 | 3e22173a3dc623f464a3f9a8db5f94127bbb6548b68a8d2788e2e899ac30a781 |
Hashes for greenlet-1.0a1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af78987a646280263647e65bf19eef4c6bc0b5e1a66c264779907efae51f1434 |
|
MD5 | 4aaf5d89e576129eaf6b546ee7b0bd22 |
|
BLAKE2b-256 | 8bfcd2a133f1cf354ba04da40ad72411d3f86f6f9c905c3f39dca7ff323a365f |
Hashes for greenlet-1.0a1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8c0c9f1fb87fbef28a70ac42ba55e2ee133cbb3c0f167de8923f5cb4d0050c8 |
|
MD5 | b0cd511c6ebaeb8688983ff927299852 |
|
BLAKE2b-256 | 60c8ae0271d463b3bfa955aa7f7d67856b7464d34b7bd9b52b141d102130db4e |
Hashes for greenlet-1.0a1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8da5b350d719c0b03cf257bc10aa67262eb3ed1896690f1375766b936f5f501 |
|
MD5 | 22d13338b32897c1f7dd6974736a3507 |
|
BLAKE2b-256 | 5ff2f80426a51a4ba7fbd3eff139550fc6f2b6538e98bca5f53d1475d3945b16 |
Hashes for greenlet-1.0a1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1757050236e55806fab391b62cd084e56d16f23375012b84540f182fec643782 |
|
MD5 | 25d3b8abac03dde5c072b9cde6d2be7c |
|
BLAKE2b-256 | d9aa32d740f95eb691b8501f88f5f26cf62e5d39f5cd5fa1490c8dcc4e6d4823 |
Hashes for greenlet-1.0a1-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36c438c7c072763b6bd821d437eee2c179f169318f45fb5ff61763897833446b |
|
MD5 | 60bb91a4906d54c1d4fd53276ab2f5c8 |
|
BLAKE2b-256 | 0d948444a6f17e0fc4f01bee715fd6f7056cbc5e19d537b305a04238586cc01f |
Hashes for greenlet-1.0a1-cp36-cp36m-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00a4f2bc499bf6a3c09de4bae8c9eb95418cf0fc71826f9310d3e10b9484f38a |
|
MD5 | 2a691dc4ef2e1d5daf52bf20a0676525 |
|
BLAKE2b-256 | d5466f56d72204380e9d0c7d1cc4b5a03ad7b1b9542943c803a1d2e8637e8458 |
Hashes for greenlet-1.0a1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 256d1c4a74a3e4673ec46c270fcedbe6038e21852bebcc1b5a210fd8ae573a0b |
|
MD5 | cceaa321a83f83cd485ab6441a01573f |
|
BLAKE2b-256 | ebd7d83b6538f4db04931a0597a29f612ea6fccf7e86754ca3f58c11d82f51d0 |
Hashes for greenlet-1.0a1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4059e6e210129ea53163751afcbb4eac3fff8f221c1a60c126f55a9f7e2c543 |
|
MD5 | 14341d6affa1563494940a3037437ec8 |
|
BLAKE2b-256 | 038c15dea273a43db5cd6be678af87bac5c2cbe3c88800f360fb1d17b7d64e6d |
Hashes for greenlet-1.0a1-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a037701be277b7df34fdf4141287587e00ee693e105d1b5985724774d7829f72 |
|
MD5 | ecce4309e9bdc6e2d6104b890638f6e3 |
|
BLAKE2b-256 | fa63f1e92f0cf211185c992b0d7593b08bbad2f43496113bdacf5afda57ec7bb |
Hashes for greenlet-1.0a1-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7394e14c5466985adfac33d68376dd2ada95d73fe07052eeb3392af83b314ffe |
|
MD5 | 511a91241f94948c9e74a8dd397ba62e |
|
BLAKE2b-256 | cc046b8d1a7c50f7e077ad6db24ce198fac65de66d6313c188d34d22c170ea2b |
Hashes for greenlet-1.0a1-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 873bfd64fd37831ef7014d24e576e1e8b01bea1c1e70eb9f5c2a07c595d8f778 |
|
MD5 | b918c60c746beda0606a64f3ee80de13 |
|
BLAKE2b-256 | b4405778a87f4da52170b796895e900d3e108dc06b34932b77097cfd0c6e8229 |
Hashes for greenlet-1.0a1-cp35-cp35m-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec56975fffc2ef2a8d1c0af9eb58769f71a1fd88c4d1f690b67a2c34d336402e |
|
MD5 | f6c995fb241bf829cd270b37487f40fb |
|
BLAKE2b-256 | af88502d617331422a73ac283a44004e676e407f6a87a0c4afb56457de714dcc |
Hashes for greenlet-1.0a1-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ea5f116105cb0994303da910067428fe083be13091a20fc25ff90504a8fbd29 |
|
MD5 | bd4d36a2e0b8a02d5f4201391a012ba7 |
|
BLAKE2b-256 | a9edfea2ce830576ef593e9b2a6e0d17f7fea41856ee70d8d2a10f3e8c7e363d |
Hashes for greenlet-1.0a1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b68aa06197b3a36384ced8d691bb593bfa026b286f6112370f476ffeee12f34 |
|
MD5 | f0bc34ae4a4706952e56f1d9284ffc84 |
|
BLAKE2b-256 | 33cb9690baf607a0c2d15d333d9b0202065fd10939ebe3acfd01f180a62c2508 |
Hashes for greenlet-1.0a1-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4569b6fc594f41a0ec47d7aec39fd1dfc24e43ddcf3e6835bdd943516c44749b |
|
MD5 | ec9985928761db8f3c8b6fb4721b4f53 |
|
BLAKE2b-256 | af8e7a2b97244cb32cebfbb06d4640aa3d477ee1f2ddb5d70f5432fb84ffec7f |
Hashes for greenlet-1.0a1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77587f9e69a7b64ad008dfcd7fc745a87685eb978ac5bf11edb56fb345c56749 |
|
MD5 | 00478c1ce51a8b108cb3742e505404d4 |
|
BLAKE2b-256 | 8368fb30453c30cdfa1ebd4b5ab2cbd6fcfceee902b9cd6912e8c98ef8dc0b37 |
Hashes for greenlet-1.0a1-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81710ec4724864abf1cabaf7b448544fffe8d3eb8e9a00aac8257cc26ce259bd |
|
MD5 | 49a2ea2f1a293666e5825d341a6d6e13 |
|
BLAKE2b-256 | 2289a8d0be21b2fe2363a5f52aef770daa5986e0e45104579c1965357cfe3649 |
Hashes for greenlet-1.0a1-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee9caa8a2c928f009e85ae3656d3e1c8e1fe7efdc64c6cddcbfc595bd55ebbb1 |
|
MD5 | 1c6b83e614dc66a47bcf013c203409bc |
|
BLAKE2b-256 | 29a2eb9f9b4be1382c6a796ef2bb15bff497f6698feef566e2fd0c77bd457e0a |
Hashes for greenlet-1.0a1-cp27-cp27m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f707788647fe07e729abcb6d76de6ef5f06eb2c20bc059295f4041f8c663dc85 |
|
MD5 | cf8f185689e19158d670a8daccef5c86 |
|
BLAKE2b-256 | 02f5bca4ecfa6e0682cb04e89eca63106c4d71dde7742bc772e60bb9ee635bba |
Hashes for greenlet-1.0a1-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed2fa1a9d1556f937c4bf58241d670da9a6c833c14ecadccb7f891a4bb22d05a |
|
MD5 | 1f52e06439d8a2462d4ff32a81db890a |
|
BLAKE2b-256 | 8bc372ad71015a582929e461099ba83c2028b9bf32ea31266621e1fbf51da36f |
Hashes for greenlet-1.0a1-cp27-cp27m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | feaa41c4fc47da4814b4cec8174da31b65490fcd710c28d495b96dbc63586b81 |
|
MD5 | 3dcb0f8cef5141333826f9c8e80d21f4 |
|
BLAKE2b-256 | 47a11eff885c352590229cf2555a7f9058e464f6e61e2efac33860c5913640b2 |