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.0.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d69bbd9547d3bc49f8a545db7a0bd69f407badd2ff0f6e1a163680b5841d2b0 |
|
MD5 | 91fb07b70474276d8d9116d098a3427e |
|
BLAKE2b-256 | 85eb12de35bea8fcae88e0823d846b4e36f78628a9434dc44b8df5095ce09836 |
Hashes for greenlet-1.0.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f297cb343114b33a13755032ecf7109b07b9a0020e841d1c3cedff6602cc139 |
|
MD5 | 413c80b2edc525f3d123d5db1bdce51a |
|
BLAKE2b-256 | 3c574684f5dbb535d0118e594260222b5215758ac23d80076a123ef9e8c83adb |
Hashes for greenlet-1.0.0-cp39-cp39-manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58ca0f078d1c135ecf1879d50711f925ee238fe773dfe44e206d7d126f5bc664 |
|
MD5 | dd05935a3741cbb9ad045caee7fdf107 |
|
BLAKE2b-256 | c9d2604d6be1bf14089ac493e849d00ab90fa970e297f317409d1c8aad1cace2 |
Hashes for greenlet-1.0.0-cp39-cp39-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 181300f826625b7fd1182205b830642926f52bd8cdb08b34574c9d5b2b1813f7 |
|
MD5 | 0b1e07ab634d1622c0ffbebfb6589a44 |
|
BLAKE2b-256 | 25cfab6c0c4906b790df7e164f574300de7eac23a6273ef1002f7df559c6bf22 |
Hashes for greenlet-1.0.0-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df3e83323268594fa9755480a442cabfe8d82b21aba815a71acf1bb6c1776218 |
|
MD5 | 77e96489be92c02e874fd5d813e37f81 |
|
BLAKE2b-256 | b5e9545b42c6f345d74d8cff9471d385e3baf8635d771ded9cf2568f3621f9b0 |
Hashes for greenlet-1.0.0-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df8053867c831b2643b2c489fe1d62049a98566b1646b194cc815f13e27b90df |
|
MD5 | 901a61c0efae19556ddc1137ca03d19f |
|
BLAKE2b-256 | ea647fd8f571f04760c593c5f8d32b13ab27793b67f662f79d1a4294ebf4a11d |
Hashes for greenlet-1.0.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8450d5ef759dbe59f84f2c9f77491bb3d3c44bc1a573746daf086e70b14c243 |
|
MD5 | f4bfdbaad57ea060759887928d57834b |
|
BLAKE2b-256 | 5dd476a90758e25af72566ea07d245d8608263b57e2d51b76f27b58c680f8c04 |
Hashes for greenlet-1.0.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d4030b04061fdf4cbc446008e238e44936d77a04b2b32f804688ad64197953c |
|
MD5 | ac423144ae44e1c2de613c738db0f67c |
|
BLAKE2b-256 | 670f56e60ad080a4c62212337a5cfe8b7fb7081caa488a292e60b6da97e62785 |
Hashes for greenlet-1.0.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1128e022d8dce375362e063754e129750323b67454cac5600008aad9f54139e |
|
MD5 | dcb35f28097665bb0f88a0dfebc80a40 |
|
BLAKE2b-256 | b004f0c65f2ccabbc39e80d384bba7f06b1c42fe8d45a7a127b45bde5cf36952 |
Hashes for greenlet-1.0.0-cp38-cp38-manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a77691f0080c9da8dfc81e23f4e3cffa5accf0f5b56478951016d7cfead9196 |
|
MD5 | 76a74101a50f7042daebc8349282549d |
|
BLAKE2b-256 | f918cad6001e9756654bd7e9eb27d881f0a1e4e8f2d54621cebfb0ae73596d3f |
Hashes for greenlet-1.0.0-cp38-cp38-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f97d83049715fd9dec7911860ecf0e17b48d8725de01e45de07d8ac0bd5bc378 |
|
MD5 | 28c1478b8394876c6ad1a4e2bb94145c |
|
BLAKE2b-256 | e130efc390969ad181cfc0a3045ccfd6f8f76fbeb69626605de338b535301008 |
Hashes for greenlet-1.0.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94620ed996a7632723a424bccb84b07e7b861ab7bb06a5aeb041c111dd723d36 |
|
MD5 | 3c63360814481579be8ac327e01aea5c |
|
BLAKE2b-256 | cf305a75dd5405999781f66cb66acac3fcb659d96c5d0708a6143e61d8ba7842 |
Hashes for greenlet-1.0.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed1d1351f05e795a527abc04a0d82e9aecd3bdf9f46662c36ff47b0b00ecaf06 |
|
MD5 | 1db3c4ad82dece0b2cd8180b63d810c6 |
|
BLAKE2b-256 | 6d59b8e9baf19c1aaa438c1a196a007a1cc78f55877d7b860ac24e203066e911 |
Hashes for greenlet-1.0.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90b6a25841488cf2cb1c8623a53e6879573010a669455046df5f029d93db51b7 |
|
MD5 | 650a04190f721fb05bfa4b1180f955ff |
|
BLAKE2b-256 | d9371fee841ae56de5bb143ea0ed400e9968f93db665c3f24d1660f6c91e28f6 |
Hashes for greenlet-1.0.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ddd77586553e3daf439aa88b6642c5f252f7ef79a39271c25b1d4bf1b7cbb85 |
|
MD5 | 74f904fe0df7348b5e7c86efd76bec3a |
|
BLAKE2b-256 | 417ee257a22493bf2f07234973a96fcd5a6f733dfad5161a043e5538ac6ecc9a |
Hashes for greenlet-1.0.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cd5a237f241f2764324396e06298b5dee0df580cf06ef4ada0ff9bff851286c |
|
MD5 | 42b325c672c88ab35eeb56161253a993 |
|
BLAKE2b-256 | 9983128ad195895aa0d600b8dafbe2dd8ab0edd12f5dddcce9e6c036dc8d8859 |
Hashes for greenlet-1.0.0-cp37-cp37m-manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3dc68272990849132d6698f7dc6df2ab62a88b0d36e54702a8fd16c0490e44f |
|
MD5 | c3b919fd560e3459292f01151b42465f |
|
BLAKE2b-256 | 581186c46804864a7a38e8111dc243cf7b0bcf273b030c2f8b40753791ff102d |
Hashes for greenlet-1.0.0-cp37-cp37m-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 292e801fcb3a0b3a12d8c603c7cf340659ea27fd73c98683e75800d9fd8f704c |
|
MD5 | 441bcdfe910f07ef2d2ad9ee70eed8a7 |
|
BLAKE2b-256 | 6e55973bced6f21298a50bb46bdb1111c09a621fb17ac6df3b11d1c5532ece45 |
Hashes for greenlet-1.0.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5e2d36c86c7b03c94b8459c3bd2c9fe2c7dab4b258b8885617d44a22e453fb7 |
|
MD5 | 0be860a1e1008700fd9294f9b9ee9329 |
|
BLAKE2b-256 | c625f52f0dde4135833c2f85eae30a749d260231065b46942534df8366d7e1ec |
Hashes for greenlet-1.0.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3789c1c394944084b5e57c192889985a9f23bd985f6d15728c745d380318128 |
|
MD5 | 1c9fcb219b10aa9b835ebd186c686e3d |
|
BLAKE2b-256 | b28510a278789c97c4cadf15780cfd7b67f7b190a57abbfac886efb44ab83fc6 |
Hashes for greenlet-1.0.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62afad6e5fd70f34d773ffcbb7c22657e1d46d7fd7c95a43361de979f0a45aef |
|
MD5 | 9ee6b944a418aead7d3e34bb5d127ee4 |
|
BLAKE2b-256 | 4b751a4c2ffdecb1d6aa7ea425e1871994b790c2a5a9b02ee3f2874256142142 |
Hashes for greenlet-1.0.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6e9fdaf6c90d02b95e6b0709aeb1aba5affbbb9ccaea5502f8638e4323206be |
|
MD5 | 9f4a6937c071d1d1fce1d913e8009bce |
|
BLAKE2b-256 | 925d545226250a06e2a4cdcb710585261d8173a475e4822b0f3ff2b6c510b59d |
Hashes for greenlet-1.0.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 647ba1df86d025f5a34043451d7c4a9f05f240bee06277a524daad11f997d1e7 |
|
MD5 | a9e0e4691a6ae21a713c3653ec322561 |
|
BLAKE2b-256 | bd04c9452c09d008cfccffb93921f92f218b2ed5c322b1cf4106edc807be5c9a |
Hashes for greenlet-1.0.0-cp36-cp36m-manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da7d09ad0f24270b20f77d56934e196e982af0d0a2446120cb772be4e060e1a2 |
|
MD5 | 396b464483a785e9dd9e951d8a761f96 |
|
BLAKE2b-256 | 6b1552846eed5a56c52ce1879ae41cbdfb3608feb7a34c3b2a2844b4df459cc4 |
Hashes for greenlet-1.0.0-cp36-cp36m-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4365eccd68e72564c776418c53ce3c5af402bc526fe0653722bc89efd85bf12d |
|
MD5 | cd367222ffbaccc0a3f2000f77454a9c |
|
BLAKE2b-256 | d444c26936868867c8fcd33fc24ca05f22a8759070473762a5a562f3ed154f91 |
Hashes for greenlet-1.0.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5b22b31c947ad8b6964d4ed66776bcae986f73669ba50620162ba7c832a6b6a |
|
MD5 | c520009b93855b3e1560edea1ce45620 |
|
BLAKE2b-256 | 22e29fbb24cf1ee89813ded3761314562a83a2822ad2bf5682eef0d0c99e2a5d |
Hashes for greenlet-1.0.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 122c63ba795fdba4fc19c744df6277d9cfd913ed53d1a286f12189a0265316dd |
|
MD5 | 29187ace72ca3313ce1503a78ee66f26 |
|
BLAKE2b-256 | b73dad33c508d1ee8fb5d32c24986ebfd8f71df1b05e8683d1406658c62b3b25 |
Hashes for greenlet-1.0.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c93d1a71c3fe222308939b2e516c07f35a849c5047f0197442a4d6fbcb4128ee |
|
MD5 | d039b07d13112416b9cbae89afa12451 |
|
BLAKE2b-256 | 49d7fc67f781b698d88e8df023e2be332ed2c76761f0fdd77eeb81553e5ab519 |
Hashes for greenlet-1.0.0-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eac8803c9ad1817ce3d8d15d1bb82c2da3feda6bee1153eec5c58fa6e5d3f770 |
|
MD5 | 645de1bb3e6b8c5136ab11b2b9dc58bd |
|
BLAKE2b-256 | 223edfab23ce7235162c47e727f8da36a0970273ea63b4b32acfa3fc8f24b955 |
Hashes for greenlet-1.0.0-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdb90267650c1edb54459cdb51dab865f6c6594c3a47ebd441bc493360c7af70 |
|
MD5 | 88d4cfd163470631e823da91acc01587 |
|
BLAKE2b-256 | 4fea245889405f949a4c953e4b92667c21b25fd5c0c046c9aa33c7218b517150 |
Hashes for greenlet-1.0.0-cp35-cp35m-manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 111cfd92d78f2af0bc7317452bd93a477128af6327332ebf3c2be7df99566683 |
|
MD5 | 8602816b8eda1e2d409d84cc8d97a725 |
|
BLAKE2b-256 | cfe81030cffde4d47459c3745cd20ce0a24eb3b17de12d0cfcc21457aafd445a |
Hashes for greenlet-1.0.0-cp35-cp35m-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c65320774a8cd5fdb6e117c13afa91c4707548282464a18cf80243cf976b3e6 |
|
MD5 | f2582db9c3857ead2c0859cadac3e12a |
|
BLAKE2b-256 | cb4a4c66b7e31d18f93468705c43653ae24f629200dc1d1ba5e6a3539666d821 |
Hashes for greenlet-1.0.0-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5352c15c1d91d22902582e891f27728d8dac3bd5e0ee565b6a9f575355e6d92f |
|
MD5 | 40470af5a6ac321e2ff039515d1468e1 |
|
BLAKE2b-256 | 1cef36713bb34ab5671be6b58bd797dabb9d6a5d16f5586f389a174f759470a2 |
Hashes for greenlet-1.0.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5f1b333015d53d4b381745f5de842f19fe59728b65f0fbb662dafbe2018c3a5 |
|
MD5 | d2697a26faa6190b3f5a44b1f6174253 |
|
BLAKE2b-256 | b50a5c2f67f6445bffa3f795646fa56ac8fde66a77fc5821c552bd5620a3b9e5 |
Hashes for greenlet-1.0.0-cp35-cp35m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bb80c71de788b36cefb0c3bb6bfab306ba75073dbde2829c858dc3ad70f867c |
|
MD5 | b4adfaf4d615403ce21b364f6ac028d6 |
|
BLAKE2b-256 | fbd66d613c0d2e622f1d52b867073ffba07aa1ff1f28f80b91dc09b0e7a585f8 |
Hashes for greenlet-1.0.0-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 875d4c60a6299f55df1c3bb870ebe6dcb7db28c165ab9ea6cdc5d5af36bb33ce |
|
MD5 | 0d2485108793e081313ff2f88e50d6a3 |
|
BLAKE2b-256 | 989e09fcefa449da90bddbeca35607efbcc6b591b843a7966b3b3964ce3c02b3 |
Hashes for greenlet-1.0.0-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f59eded163d9752fd49978e0bab7a1ff21b1b8d25c05f0995d140cc08ac83379 |
|
MD5 | ed266f4399302c8d5742a25ed68c42d2 |
|
BLAKE2b-256 | 82c7760c570c083d6451ab0e2d806d7db7d1d845969f6fa20fd91dda692ae145 |
Hashes for greenlet-1.0.0-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6f65bf54215e4ebf6b01e4bb94c49180a589573df643735107056f7a910275b |
|
MD5 | 725fbab6e81c3fff972b43275ddcd229 |
|
BLAKE2b-256 | 5ec36792e17fa8dfb83ba217444fd69087b0d9d1b7d43055a67eecdfcde61287 |
Hashes for greenlet-1.0.0-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a1ada42a1fd2607d232ae11a7b3195735edaa49ea787a6d9e6a53afaf6f3476 |
|
MD5 | 39231f0e0c67c74b08128e994f1ffa33 |
|
BLAKE2b-256 | 782c78bd4f1d049edd6b4feb11af41620228e71742da937cc70447201fd701d0 |
Hashes for greenlet-1.0.0-cp27-cp27m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb333b90036358a0e2c57373f72e7648d7207b76ef0bd00a4f7daad1f79f5203 |
|
MD5 | bdb477db6dfce600ecb2598ceafa088f |
|
BLAKE2b-256 | d3cba06d5032a6b5700ae1039778857b0961ccbd8589cfe1c1224316d41b9979 |
Hashes for greenlet-1.0.0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfd06e0f0cc8db2a854137bd79154b61ecd940dce96fad0cba23fe31de0b793c |
|
MD5 | 366c9e916575c8282481d40cf5e2c651 |
|
BLAKE2b-256 | a9305ac4c6513c9f74b79f54fa7e1e6786c2c690de41e4264b6c25ef8bd19494 |
Hashes for greenlet-1.0.0-cp27-cp27m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d1d4473ecb1c1d31ce8fd8d91e4da1b1f64d425c1dc965edc4ed2a63cfa67b2 |
|
MD5 | 8e4b1a8dc95d439eee9d95f02c3d225e |
|
BLAKE2b-256 | 5e4ad863f9f5e7fc7c2e38ac73b11642b0745cc852875c9eeae4b8ad571e6194 |