Skip to main content

Lightweight in-process concurrent programming

Project description

https://secure.travis-ci.org/python-greenlet/greenlet.png

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.python.org/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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

greenlet-0.4.17.tar.gz (61.4 kB view details)

Uploaded Source

Built Distributions

greenlet-0.4.17-cp39-cp39-manylinux1_x86_64.whl (46.9 kB view details)

Uploaded CPython 3.9

greenlet-0.4.17-cp38-cp38-win_amd64.whl (19.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

greenlet-0.4.17-cp38-cp38-win32.whl (17.9 kB view details)

Uploaded CPython 3.8 Windows x86

greenlet-0.4.17-cp38-cp38-manylinux1_x86_64.whl (48.9 kB view details)

Uploaded CPython 3.8

greenlet-0.4.17-cp37-cp37m-win_amd64.whl (19.3 kB view details)

Uploaded CPython 3.7m Windows x86-64

greenlet-0.4.17-cp37-cp37m-win32.whl (17.7 kB view details)

Uploaded CPython 3.7m Windows x86

greenlet-0.4.17-cp37-cp37m-manylinux1_x86_64.whl (45.6 kB view details)

Uploaded CPython 3.7m

greenlet-0.4.17-cp36-cp36m-win_amd64.whl (19.2 kB view details)

Uploaded CPython 3.6m Windows x86-64

greenlet-0.4.17-cp36-cp36m-win32.whl (17.7 kB view details)

Uploaded CPython 3.6m Windows x86

greenlet-0.4.17-cp36-cp36m-manylinux1_x86_64.whl (44.2 kB view details)

Uploaded CPython 3.6m

greenlet-0.4.17-cp35-cp35m-win_amd64.whl (19.2 kB view details)

Uploaded CPython 3.5m Windows x86-64

greenlet-0.4.17-cp35-cp35m-win32.whl (17.7 kB view details)

Uploaded CPython 3.5m Windows x86

greenlet-0.4.17-cp35-cp35m-manylinux1_x86_64.whl (44.3 kB view details)

Uploaded CPython 3.5m

greenlet-0.4.17-cp27-cp27mu-manylinux1_x86_64.whl (42.8 kB view details)

Uploaded CPython 2.7mu

greenlet-0.4.17-cp27-cp27m-win_amd64.whl (17.3 kB view details)

Uploaded CPython 2.7m Windows x86-64

greenlet-0.4.17-cp27-cp27m-win32.whl (16.6 kB view details)

Uploaded CPython 2.7m Windows x86

greenlet-0.4.17-cp27-cp27m-manylinux1_x86_64.whl (42.8 kB view details)

Uploaded CPython 2.7m

File details

Details for the file greenlet-0.4.17.tar.gz.

File metadata

  • Download URL: greenlet-0.4.17.tar.gz
  • Upload date:
  • Size: 61.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17.tar.gz
Algorithm Hash digest
SHA256 41d8835c69a78de718e466dd0e6bfd4b46125f21a67c3ff6d76d8d8059868d6b
MD5 d964c95c2d2f0f02f36c75e158d8e3dc
BLAKE2b-256 720cfd07c7674ad6eded937194b84d8453425c36c6ef118536907b0185624d82

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp39-cp39-manylinux1_x86_64.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp39-cp39-manylinux1_x86_64.whl
  • Upload date:
  • Size: 46.9 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1023d7b43ca11264ab7052cb09f5635d4afdb43df55e0854498fc63070a0b206
MD5 a8e5d5a2304170195a130d0f51cc8009
BLAKE2b-256 7bfc73c319c2dbf5426cb2152618eb858c60b39642144a8c6185317abc952771

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 47825c3a109f0331b1e54c1173d4e57fa000aa6c96756b62852bfa1af91cd652
MD5 86de92c05efbdfe0e5e39c5593c88ab1
BLAKE2b-256 cd59251e02f8f3b248bb0fd731ae93488e1d72eabb0af21f13e7561d743af4ce

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp38-cp38-win32.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp38-cp38-win32.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 e66a824f44892bc4ec66c58601a413419cafa9cec895e63d8da889c8a1a4fa4a
MD5 7d00a0e821a97262b48fea14c060db6e
BLAKE2b-256 bded245eab9778fb0f0fd3a3b13aeeff35e9f48e513ffd4e0d6dc9f8a2ad1f3f

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 48.9 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a34023b9eabb3525ee059f3bf33a417d2e437f7f17e341d334987d4091ae6072
MD5 0df05042e20de6d8c94200ee933d1beb
BLAKE2b-256 da8d0e8d2b0a8d9cb78eb822adcb2a00906406c16bf7b7c561f9ebac96f9fc97

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 d3436110ca66fe3981031cc6aff8cc7a40d8411d173dde73ddaa5b8445385e2d
MD5 a0ebe8500a7a7ad3cf32f8e839c731ed
BLAKE2b-256 e4cab15607286f4c2592200eb45b4779f22d4673d7575d2b285da00b86fac99c

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp37-cp37m-win32.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 97f2b01ab622a4aa4b3724a3e1fba66f47f054c434fbaa551833fa2b41e3db51
MD5 ff33213f7e2c1e7584bdbbfbfa99bac5
BLAKE2b-256 807dfe2b8c93e67987ca40342035337ce32f33d1f9d8ba2008a4e252cb0507b3

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 45.6 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 be7a79988b8fdc5bbbeaed69e79cfb373da9759242f1565668be4fb7f3f37552
MD5 11c5ae0a06f541b369df7db8274a04e5
BLAKE2b-256 b4342c4ea49f9d41aaf664f72abb10880a56d3560398b74b3936055579188836

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 4481002118b2f1588fa3d821936ffdc03db80ef21186b62b90c18db4ba5e743b
MD5 19c7f9d72311d32dd211d00d52140aaf
BLAKE2b-256 af8d0b818a17e5cf7fa4ebba344ff65d18b55aa41e419ce863e374d34e82dbb9

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp36-cp36m-win32.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 ac85db59aa43d78547f95fc7b6fd2913e02b9e9b09e2490dfb7bbdf47b2a4914
MD5 6cad142cf4ea39902e3d2638c4f84b33
BLAKE2b-256 398172c1833b8944e41a6a830b52594bea0a99146b49f046953b849e3117ced0

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 44.2 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 bee111161420f341a346731279dd976be161b465c1286f82cc0779baf7b729e8
MD5 581e5d1a9f9c64fa1bf06851427e8f12
BLAKE2b-256 80d0532e160c777b42f6f393f9de8c88abb8af6c892037c55e4d3a8a211324dd

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp35-cp35m-win_amd64.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 5494e3baeacc371d988345fbf8aa4bd15555b3077c40afcf1994776bb6d77eaf
MD5 d533771fb5ffd838e71ce003a8c904e0
BLAKE2b-256 a3aef24270a14bacd31d03412ed0b2b488bfed94207fe387362540704253dafa

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp35-cp35m-win32.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 124a3ae41215f71dc91d1a3d45cbf2f84e46b543e5d60b99ecc20e24b4c8f272
MD5 d8c9c90087ae7eb5091ab4295c52ad31
BLAKE2b-256 e461796434b83258269b627aa2531921ac5b9e0f6728ced4395651db5180ca0c

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 44.3 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e495096e3e2e8f7192afb6aaeba19babc4fb2bdf543d7b7fed59e00c1df7f170
MD5 d29a05b8fad932b41feeb4699751fef2
BLAKE2b-256 dd422b4a5d4ca1fa6bf0e38a01ec797db8b824444c259b5a51456d611093c9c6

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 42.8 kB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 13037e2d7ab2145300676852fa069235512fdeba4ed1e3bb4b0677a04223c525
MD5 fca5b473699895bf9d6e3cadeabb787e
BLAKE2b-256 4bd4bbea0eee6bc1ee0aca4446934ab175c93638f326b56a682d8dc953f66d67

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp27-cp27m-win_amd64.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 ccd62f09f90b2730150d82f2f2ffc34d73c6ce7eac234aed04d15dc8a3023994
MD5 f139a882a2a2167668eb738945952a20
BLAKE2b-256 13b7ab847498272b89481582cf7dc138c0988c847f28c82ffcee151b4b60342a

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp27-cp27m-win32.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: CPython 2.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 3af587e9813f9bd8be9212722321a5e7be23b2bc37e6323a90e592ab0c2ef117
MD5 06c15adac0997cfb8941810f0a9be955
BLAKE2b-256 6fa3984881d3fb0fcd7d5103162a12d7c1d62590143d68b1c063f402696a24c8

See more details on using hashes here.

File details

Details for the file greenlet-0.4.17-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

  • Download URL: greenlet-0.4.17-cp27-cp27m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 42.8 kB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for greenlet-0.4.17-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 75e4c27188f28149b74e7685809f9227410fd15432a4438fc48627f518577fa5
MD5 6474f50fce7391f38aedb0dd52626826
BLAKE2b-256 0418c6924f44c022ae102e118cecd098db048478623b490336dd70abd2f74583

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page