Skip to main content

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 in-process concurrent programming. This package is the py.magic.greenlet module from the py lib.

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

Project details


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.3.tar.gz (38.0 kB view details)

Uploaded Source

Built Distributions

greenlet-0.3.win32-py3.1.exe (214.8 kB view details)

Uploaded Source

greenlet-0.3.win32-py3.0.exe (210.3 kB view details)

Uploaded Source

greenlet-0.3.win32-py2.6.exe (214.6 kB view details)

Uploaded Source

greenlet-0.3.win32-py2.5.exe (76.7 kB view details)

Uploaded Source

greenlet-0.3.win32-py2.4.exe (76.6 kB view details)

Uploaded Source

greenlet-0.3-py3.1-win32.egg (15.7 kB view details)

Uploaded Source

greenlet-0.3-py3.0-win32.egg (11.2 kB view details)

Uploaded Source

greenlet-0.3-py2.6-win32.egg (15.5 kB view details)

Uploaded Source

greenlet-0.3-py2.5-win32.egg (12.2 kB view details)

Uploaded Source

greenlet-0.3-py2.4-win32.egg (12.1 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: greenlet-0.3.tar.gz
  • Upload date:
  • Size: 38.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for greenlet-0.3.tar.gz
Algorithm Hash digest
SHA256 332081e9e69c9f7a368af9e29e4b45c28f6747fc466d4685ec667d5019d85405
MD5 199625126e343804f1b0564284406290
BLAKE2b-256 9f29c8d0b051afacd0108c26a89824a13fa041299b61e8d9e50a6a35e25c4ec1

See more details on using hashes here.

File details

Details for the file greenlet-0.3.win32-py3.1.exe.

File metadata

File hashes

Hashes for greenlet-0.3.win32-py3.1.exe
Algorithm Hash digest
SHA256 c3cf251a3c3a561d7554e23df6675e39e9c225015fb670f7f70cf30717e8cfbd
MD5 dbe31dfdbdc3a3a0cd28feb81d7fd277
BLAKE2b-256 149aa775fd97e4ed13bd8987471bebcf426f7b852344de9e88c1630d1082b8c5

See more details on using hashes here.

File details

Details for the file greenlet-0.3.win32-py3.0.exe.

File metadata

File hashes

Hashes for greenlet-0.3.win32-py3.0.exe
Algorithm Hash digest
SHA256 ba5d2288a1905734cc6597007a0a688e5f55b066f62f8b7848dd1da0083dd648
MD5 4da1cfd842949985cb5ce980983b6e58
BLAKE2b-256 e322a644e92ca628dd17f2e86e8558f0d7622266d088c3f5cdc3e7152a48bd68

See more details on using hashes here.

File details

Details for the file greenlet-0.3.win32-py2.6.exe.

File metadata

File hashes

Hashes for greenlet-0.3.win32-py2.6.exe
Algorithm Hash digest
SHA256 17e9aeb296fb886c8829d85038147de0a6da7f6ca5323960016e232298baed60
MD5 7c444282aada4e6bd3b80230cfbb66dc
BLAKE2b-256 93e8830969c22af76ec7519cf3db2416b3d7f7577e0bc94711ee90ec1d4795c4

See more details on using hashes here.

File details

Details for the file greenlet-0.3.win32-py2.5.exe.

File metadata

File hashes

Hashes for greenlet-0.3.win32-py2.5.exe
Algorithm Hash digest
SHA256 bedb4680fda7a4f49ba5b71718b538c0a3348c17ae3d426a0b03e56d1eea29ab
MD5 037f300327e606a82e953b7737f5968c
BLAKE2b-256 24f189462d0fa68fbada5d7ad6a6080b43ca41bb22b67e742ff0ebe9553f1a62

See more details on using hashes here.

File details

Details for the file greenlet-0.3.win32-py2.4.exe.

File metadata

File hashes

Hashes for greenlet-0.3.win32-py2.4.exe
Algorithm Hash digest
SHA256 8db21b4063f10d9c2a4f1882b41a1164fca048ef9c5eca6e64b063cbc4662dde
MD5 277e3d04b2a21fef560341c01cb03e7f
BLAKE2b-256 0cbb5b60868bef17879d61953713132c89a58423e13659c3745a0f4235ba4c2f

See more details on using hashes here.

File details

Details for the file greenlet-0.3-py3.1-win32.egg.

File metadata

File hashes

Hashes for greenlet-0.3-py3.1-win32.egg
Algorithm Hash digest
SHA256 d659ad43e5244e1ab5c9f614bd9b0aa0408b70c414b59fe78f1ea6fee928dc8e
MD5 94f4f10ee665f98d8b5c2604fb2533e3
BLAKE2b-256 39885e119a5db551728d50a08b5349a39725764fddb26396bce0f0e90a5deff9

See more details on using hashes here.

File details

Details for the file greenlet-0.3-py3.0-win32.egg.

File metadata

File hashes

Hashes for greenlet-0.3-py3.0-win32.egg
Algorithm Hash digest
SHA256 626fc78d64784ac01e61b3c14aa293701dfd167703ee46cde90c41b96f5f0a0b
MD5 1557c662841281e490ede08d3fe6a889
BLAKE2b-256 15faaa13942d5d34b94eea1235e0ffa41ccfbc21ecfa84c46358a8c3ea690482

See more details on using hashes here.

File details

Details for the file greenlet-0.3-py2.6-win32.egg.

File metadata

File hashes

Hashes for greenlet-0.3-py2.6-win32.egg
Algorithm Hash digest
SHA256 5ec0987efd4662672c383eaf9a211cd35889e8182a7f59d0b59635b166991e90
MD5 545441737d8df660b9072e728ab4e993
BLAKE2b-256 f13ee7e47910e02286fd18e34aae79d373c70ec7631c1e35df3ee23d3195208e

See more details on using hashes here.

File details

Details for the file greenlet-0.3-py2.5-win32.egg.

File metadata

File hashes

Hashes for greenlet-0.3-py2.5-win32.egg
Algorithm Hash digest
SHA256 bc32ac1043b8328b9ee36eb2dfab81e4aa4799813b826abad926e0e2be903909
MD5 eb9350e2d373f4e860117fc7f3153e12
BLAKE2b-256 6f69afab1b09d26b54607879c6f23e720d1993514df3e55ceb4f4165c690243a

See more details on using hashes here.

File details

Details for the file greenlet-0.3-py2.4-win32.egg.

File metadata

File hashes

Hashes for greenlet-0.3-py2.4-win32.egg
Algorithm Hash digest
SHA256 89abdbde05fd681e687ee84568157a5ca7aa25c296da1cd7e2109d8d6d06dc07
MD5 1ea6ae6215d1201c675597175ace6e8f
BLAKE2b-256 e188ce1d2619513d72c5f61822770dd5a9a90cb72d0cc250d6d405f5af50d323

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