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.15-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7457d685158522df483196b16ec648b28f8e847861adb01a55d41134e7734122 |
|
MD5 | 0fa31d4054dd9312a4250bf0b26d8fcc |
|
BLAKE2b-256 | 5eb382bba3c5e9b9ea0b283883a2d3ac901ced619c6f7efda07ce3fd39393af1 |
Hashes for greenlet-0.4.15-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51155342eb4d6058a0ffcd98a798fe6ba21195517da97e15fca3db12ab201e6e |
|
MD5 | 4a380d505fa7bbc4d19af92cdbc710f9 |
|
BLAKE2b-256 | 64abd8ae05aec9f025e785b9f8e36c97f89ca70ef07d430117249bb50db39f92 |
Hashes for greenlet-0.4.15-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e538b8dae561080b542b0f5af64d47ef859f22517f7eca617bb314e0e03fd7ef |
|
MD5 | 63abc97b74f147f4c4a6bcb277bdedc5 |
|
BLAKE2b-256 | acd7ba673c476265d0cc6e194d0837a03fdbaecde15b35010d6e9f12d58d8560 |
Hashes for greenlet-0.4.15-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37c9ba82bd82eb6a23c2e5acc03055c0e45697253b2393c9a50cef76a3985304 |
|
MD5 | 27be7d82b047e14c1932221ded4fd8c1 |
|
BLAKE2b-256 | 90a3da8593df08ee2efeb86ccf3201508a1fd2a3749e2735b7cadb7dd00416c6 |
Hashes for greenlet-0.4.15-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81fcd96a275209ef117e9ec91f75c731fa18dcfd9ffaa1c0adbdaa3616a86043 |
|
MD5 | a02316b1faa95981aba289399dd23766 |
|
BLAKE2b-256 | dcb5e5cef57068eb9916d3f3d3117ce4349409742f25323b4671531183c5a1c5 |
Hashes for greenlet-0.4.15-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8041e2de00e745c0e05a502d6e6db310db7faa7c979b3a5877123548a4c0b214 |
|
MD5 | 19a855ef7c047b8ac6890030fe5bdc82 |
|
BLAKE2b-256 | 9defac10aa1293f64939e4511909c570d969566126214af5dd7ba0afd353d88b |
Hashes for greenlet-0.4.15-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d97b0661e1aead761f0ded3b769044bb00ed5d33e1ec865e891a8b128bf7c656 |
|
MD5 | 7bc9416a6a41800a7408c4c8d42a7d48 |
|
BLAKE2b-256 | a9a32a7a15c2dc23f764eaed46d41e081659aadf45570b4170156dde1c76d4f7 |
Hashes for greenlet-0.4.15-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 000546ad01e6389e98626c1367be58efa613fa82a1be98b0c6fc24b563acc6d0 |
|
MD5 | 39c624d0bb2353df082e0bfb0fc5e57f |
|
BLAKE2b-256 | ad37d22e23ddf0dc21d37b0ddadc9b29b70e5e6f4b411881c77f745e6c098841 |
Hashes for greenlet-0.4.15-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23d12eacffa9d0f290c0fe0c4e81ba6d5f3a5b7ac3c30a5eaf0126bf4deda5c8 |
|
MD5 | b9c53fbc5f7823ef13e2e05cd1461f8f |
|
BLAKE2b-256 | bf45142141aa47e01a5779f0fa5a53b81f8379ce8f2b1cd13df7d2f1d751ae42 |
Hashes for greenlet-0.4.15-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 853da4f9563d982e4121fed8c92eea1a4594a2299037b3034c3c898cb8e933d6 |
|
MD5 | ef61636fd0126d0afd2f414af66d30e2 |
|
BLAKE2b-256 | 70fdc114c3d02c2a684bfaa9c99883b6e8a8beaab166079f351d0f51ca7dd918 |
Hashes for greenlet-0.4.15-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a19bf883b3384957e4a4a13e6bd1ae3d85ae87f4beb5957e35b0be287f12f4e4 |
|
MD5 | c5183cb77e339f2ca8057b420ff01d36 |
|
BLAKE2b-256 | c292c6eb90e271bc4d4b68b180f073cf0c84856abdb684bf462aab6ec678b6b5 |
Hashes for greenlet-0.4.15-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51503524dd6f152ab4ad1fbd168fc6c30b5795e8c70be4410a64940b3abb55c0 |
|
MD5 | 2ecc38edf33a439c90ea491f6f03645c |
|
BLAKE2b-256 | 2e6527f35497cc0102a792390d056e793e064da95fc9eae45d75ae0ba49c0a0d |
Hashes for greenlet-0.4.15-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9f145660588187ff835c55a7d2ddf6abfc570c2651c276d3d4be8a2766db490 |
|
MD5 | 4e0489b5a06a8eb2bd5b734ea8002c40 |
|
BLAKE2b-256 | c1730ed5e8f552f7e1ef021e02a37b7109348e2b93bd80e9036bb35fa6071df2 |
Hashes for greenlet-0.4.15-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b4572c334593d449113f9dc8d19b93b7b271bdbe90ba7509eb178923327b625 |
|
MD5 | b7ee37144fa16b8160039ff4ce52bbc9 |
|
BLAKE2b-256 | dd9651c68ebed322be719ffe0507d3942bce83bc03a1653278d932c0942aec68 |
Hashes for greenlet-0.4.15-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcb530089ff24f6458a81ac3fa699e8c00194208a724b644ecc68422e1111939 |
|
MD5 | 247da8138af698b66cc04b615c7101c5 |
|
BLAKE2b-256 | 55465897f6658058b6689225a32f1a94f3b040728dcddb2d19e62a0d702fe9b2 |
Hashes for greenlet-0.4.15-cp33-cp33m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d48200bc50cbf498716712129eef819b1729339e34c3ae71656964dac907c28 |
|
MD5 | 3d5c8d67e1ab34e0604554d8ce9f887b |
|
BLAKE2b-256 | 3f85e70c2ace1f0b8226a8bf284afa4b0a800d14687a853f8e53f84c5fea7f55 |
Hashes for greenlet-0.4.15-cp33-cp33m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d634a7ea1fc3380ff96f9e44d8d22f38418c1c381d5fac680b272d7d90883720 |
|
MD5 | 93a964cfc686ecea4e38730c7ca56bd8 |
|
BLAKE2b-256 | 39443e5647f3fc0abc7422797b8d9db86fa4b43ae0ccabf7a1e623620762eb11 |
Hashes for greenlet-0.4.15-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac57fcdcfb0b73bb3203b58a14501abb7e5ff9ea5e2edfa06bb03035f0cff248 |
|
MD5 | 452c0e3f216851031e4081776d8e2f0c |
|
BLAKE2b-256 | 8b6ef2d25875713ad0885c8d3c69269697406652e6f64e1a6bd8264f7a609327 |
Hashes for greenlet-0.4.15-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9854f612e1b59ec66804931df5add3b2d5ef0067748ea29dc60f0efdcda9a638 |
|
MD5 | 9fb107d2e45aaa8c5f59553f0c354a5b |
|
BLAKE2b-256 | 942e36d4aa9fc190695f67b5d4918f72f2c5beca7edd3b52bc496973954bcc5d |
Hashes for greenlet-0.4.15-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | beeabe25c3b704f7d56b573f7d2ff88fc99f0138e43480cecdfcaa3b87fe4f87 |
|
MD5 | 8cd89c0f6b32e03e3dbaabc1811093f1 |
|
BLAKE2b-256 | 48ec49128a7c7dce62638ce613a3e0482158acf4b5c1585e47b1e20c2899fc6c |
Hashes for greenlet-0.4.15-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99a26afdb82ea83a265137a398f570402aa1f2b5dfb4ac3300c026931817b163 |
|
MD5 | 6dba0cd525dc0f6dacd13f8c78af9b1d |
|
BLAKE2b-256 | e6bb4be2d03bc580d2812a754c1272f9c188d101c9be437fa7a65c6a45f0fab3 |