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.16-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 133ba06bad4e5f2f8bf6a0ac434e0fd686df749a86b3478903b92ec3a9c0c90b |
|
MD5 | 6439fc7fcd25e2772c4217159e73e242 |
|
BLAKE2b-256 | 25b6ff77f68063fb850714fdbe0c420f54d5ba51b33f10545eba45ea3aaa3cce |
Hashes for greenlet-0.4.16-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e695ac8c3efe124d998230b219eb51afb6ef10524a50b3c45109c4b77a8a3a92 |
|
MD5 | 87454e89b6c0ce18fe9ee5f00f56b308 |
|
BLAKE2b-256 | 49270a2325a048dd074701c7f1d6adaa1a6b179e4ea49e68b5f1ca382462d474 |
Hashes for greenlet-0.4.16-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d83c1d38658b0f81c282b41238092ed89d8f93c6e342224ab73fb39e16848721 |
|
MD5 | 1f21b0b0038711e16645032cb7a9024d |
|
BLAKE2b-256 | 1e8f4a587a412ec75c286804566d0d6ae00b1d88af9775b9d69a99a15390d8c7 |
Hashes for greenlet-0.4.16-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0b2a984bbfc543d144d88caad6cc7ff4a71be77102014bd617bd88cfb038727 |
|
MD5 | fda53058c5d29c192180fb3d5a7d6812 |
|
BLAKE2b-256 | f5f07593b83acf86a7d83a3c7ce8318e3ebe7c1408e5ea99437fdfa9dee5cd87 |
Hashes for greenlet-0.4.16-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a35e33902b2e6079949feed7a2dafa5ac6f019da97bd255842bb22de3c11bf5 |
|
MD5 | e3c7f1ca3803e5c9c5e3427be77ab7ec |
|
BLAKE2b-256 | 3b933b95a9683bd1c18764e56d5e7b215ea745b5a85ecfcbe485d61becb5f7db |
Hashes for greenlet-0.4.16-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 682328aa576ec393c1872615bcb877cf32d800d4a2f150e1a5dc7e56644010b1 |
|
MD5 | 661d4d4a00dd2438ca5dc2aef06af293 |
|
BLAKE2b-256 | 03fdbfbe64ec3d0e5ae282ce0cb20ad20501db40293ed63ab94b9b930bcb0d8b |
Hashes for greenlet-0.4.16-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7eed31f4efc8356e200568ba05ad645525f1fbd8674f1e5be61a493e715e3873 |
|
MD5 | 98d10330df9715186c92182bf5901490 |
|
BLAKE2b-256 | 429c7ffa25e1518f9665fe63b3de5a569e9e31d20632f1e403fd740795a65223 |
Hashes for greenlet-0.4.16-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eac2a3f659d5f41d6bbfb6a97733bc7800ea5e906dc873732e00cebb98cec9e4 |
|
MD5 | 6eadcb1b498b8f1098966d1587d5a90e |
|
BLAKE2b-256 | ebbf3b7f7f47f2a5f79626ed88d757779ac7f77eaf1d946d088c959980b95071 |
Hashes for greenlet-0.4.16-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5db19d4a7d41bbeb3dd89b49fc1bc7e6e515b51bbf32589c618655a0ebe0bf0 |
|
MD5 | da6bbe619679f7ec885fb737fbe67005 |
|
BLAKE2b-256 | 7ea40d8685c98986326534b0753a8b92b3082bc9df42b348bc50d6c69839c9f9 |
Hashes for greenlet-0.4.16-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b805231bfb7b2900a16638c3c8b45c694334c811f84463e52451e00c9412691 |
|
MD5 | e363b9a5d10a99e3ce385d5d9065db07 |
|
BLAKE2b-256 | ad2d5abdbc0584f3e9b6e7cbba5265f24f1edb26834feb612a1cab9d0a38d239 |
Hashes for greenlet-0.4.16-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1000038ba0ea9032948e2156a9c15f5686f36945e8f9906e6b8db49f358e7b52 |
|
MD5 | 5e203db6ba805ba843aa231215d3ae89 |
|
BLAKE2b-256 | 42edbec87d540684ff86ea60d32f57de4a1cd6c922282c5ea748785db5aa3bc2 |
Hashes for greenlet-0.4.16-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c196a5394c56352e21cb7224739c6dd0075b69dd56f758505951d1d8d68cf8a9 |
|
MD5 | 759a230a501c65fc80bc740643ff7bcd |
|
BLAKE2b-256 | 5b20941c4a99f3463497ec0328395f0afc5bb7a47f6e354b40205efe125cda6d |
Hashes for greenlet-0.4.16-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ea034d040e6ab1d2ae04ab05a3f37dbd719c4dee3804b13903d4cc794b1336e |
|
MD5 | a27ae29a4c7f1f45769bd89862cbafbf |
|
BLAKE2b-256 | 07dc5981eba4d19681b1bcbc9ed12bef0d42ea5301e7b0e150724a5b443116f9 |
Hashes for greenlet-0.4.16-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1429dc183b36ec972055e13250d96e174491559433eb3061691b446899b87384 |
|
MD5 | db035516f9f6fbe6f25bc6773a1313c6 |
|
BLAKE2b-256 | 3ebb93b6e36741e6cb98bc460e702bfc177e7b6feab0564e2e24d03983ed8ad6 |
Hashes for greenlet-0.4.16-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df7de669cbf21de4b04a3ffc9920bc8426cab4c61365fa84d79bf97401a8bef7 |
|
MD5 | e1fcac9d1f7f51fa88928983719ac117 |
|
BLAKE2b-256 | 54bccabb9c6f1da81a12170fb9e29ac1fea8f0c8a41474c87f2848e8e92479f9 |
Hashes for greenlet-0.4.16-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80cb0380838bf4e48da6adedb0c7cd060c187bb4a75f67a5aa9ec33689b84872 |
|
MD5 | f77ffc49f169ed5ff9faccba00345a5d |
|
BLAKE2b-256 | e489d15f76364046b6fb052ff020c4b4982cc3349f2533feff2cf326be0cdb5c |