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

Uploaded Source

Built Distributions

greenlet-0.3.1.win32-py3.1.exe (214.9 kB view details)

Uploaded Source

greenlet-0.3.1.win32-py3.0.exe (210.4 kB view details)

Uploaded Source

greenlet-0.3.1.win32-py2.6.exe (214.7 kB view details)

Uploaded Source

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

Uploaded Source

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

Uploaded Source

greenlet-0.3.1-py3.1-win32.egg (15.8 kB view details)

Uploaded Source

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

Uploaded Source

greenlet-0.3.1-py2.6-win32.egg (15.6 kB view details)

Uploaded Source

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

Uploaded Source

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for greenlet-0.3.1.tar.gz
Algorithm Hash digest
SHA256 63a0a9b3a59d5413741f81d021fc6c292364953ea8dddd71ac129d77b9b143da
MD5 8d75d7f3f659e915e286e1b0fa0e1c4d
BLAKE2b-256 be545468f25bcadc6877de0bfd253f27e3ce489c3d4489c928cdb38b31ed47cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.1.win32-py3.1.exe
Algorithm Hash digest
SHA256 9217b5eadce9d0c182b0d04e24e2db57949b81a4848af919c9f4b22d09f39250
MD5 a21c3e90b396616df141a8acd10d9b12
BLAKE2b-256 2efa163a8600456a9a56d8677b96192636209519ad7c246bd8df673f8b8feda2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.1.win32-py3.0.exe
Algorithm Hash digest
SHA256 4310998ece4d8370ee9bfe884c63bbbfaac6a7d7a66770b2f7ce2e619abc18ed
MD5 8b34a679602d32ada2a0ddb6fe149caa
BLAKE2b-256 69bb1acc022b25bf0ecce81572fe41ffc9fece069751a1507b5fcf1abb7a275e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.1.win32-py2.6.exe
Algorithm Hash digest
SHA256 17991b249f6556873d4d3625005df2798036301a4b7a08b5f19cdbac65cb6792
MD5 d864adfd6a3b057267fb7d2156a62361
BLAKE2b-256 020252b935600b836612d917ef4c6fd84a5f89597075ad776aa4728992dea043

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.1.win32-py2.5.exe
Algorithm Hash digest
SHA256 74d941236b98a02d8ca6faa9b471455a65c9aabe740b2e301a68fe7b92f40a4d
MD5 7e64faaf1e9a8f1c9cd0a1496f4c1215
BLAKE2b-256 4674a702868f54025ee02eb329909e0d54d3c1dccbfd4409b3d916b6ff0c1dcf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.1.win32-py2.4.exe
Algorithm Hash digest
SHA256 433813a7fb734bdc79af23306492216668b29c2942d1f1fd96d3afabe93fdfcd
MD5 559bd37f15e3e203ae6205380070d686
BLAKE2b-256 42c35d22ae5486d5038581675c2524abb81d21bf0c928c26a46cf58d044e49e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.1-py3.1-win32.egg
Algorithm Hash digest
SHA256 9b551d3fbdb442ef71210ffcd735f1060a36e48ff501c0d26885fb6f96b33f5b
MD5 e4a9ef7a030bbecdaea585ac4cd20324
BLAKE2b-256 b2c391983893f2658b3f518b3a4c30d313ac1a3d37bfc9f773f3e2f796b13575

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.1-py3.0-win32.egg
Algorithm Hash digest
SHA256 3a9d456a691f734a6de99588e5744eaceb0d6b388ff23ad4a67ff5c89a30af0d
MD5 4a07dc930e1bfc196da7a3ef5837d9ba
BLAKE2b-256 d1f8c78fa507e50a6ce7cdf246e3021624b49f391833b6018a0c46b1bfb0d6c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.1-py2.6-win32.egg
Algorithm Hash digest
SHA256 b0a9a6c9a4bc9f8a96b423e826f00b7c36cc9207cc08853bfb634c20a63a2f21
MD5 00fa21956d80e337a992ce54f3e0d121
BLAKE2b-256 40eadc1b183f950845e042f9927c15d4ef8630859b8c020692619d37d8237f9f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.1-py2.5-win32.egg
Algorithm Hash digest
SHA256 ea5a46bbcacf786e5082e1a251518b8a3e80ec2ed19e84c7fed0cf93596e6dee
MD5 1d7d8c337eba3c2d614c0f7db248454d
BLAKE2b-256 9f20211eb0ea291f9b541d1ca2a053d5bb2a3a101e87044d3dd6e45b22eaf0f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.1-py2.4-win32.egg
Algorithm Hash digest
SHA256 7a672145d2e10a9fff6bea34242f7a1fdfa2878018939d9417890979882a05ad
MD5 8ebc72ffed8ab456c775bd14457fd9c8
BLAKE2b-256 e320b8e214959c4fc4159056f28e62eeec12899df267bc32bba288864fe40d21

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