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 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 http://pypi.python.org/pypi/greenlet

The source code repository is hosted on github: https://github.com/python-greenlet/greenlet

The master branch - i.e. the development version - can be installed directly by running one of the following:

pip install greenlet==dev
easy_install greenlet==dev

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.4.zip (63.2 kB view details)

Uploaded Source

Built Distributions

greenlet-0.3.4.win-amd64-py3.2.exe (239.0 kB view details)

Uploaded Source

greenlet-0.3.4.win-amd64-py3.1.exe (239.0 kB view details)

Uploaded Source

greenlet-0.3.4.win-amd64-py2.7.exe (238.6 kB view details)

Uploaded Source

greenlet-0.3.4.win32-py3.2.exe (211.6 kB view details)

Uploaded Source

greenlet-0.3.4.win32-py3.1.exe (211.6 kB view details)

Uploaded Source

greenlet-0.3.4.win32-py3.0.exe (211.7 kB view details)

Uploaded Source

greenlet-0.3.4.win32-py2.7.exe (211.6 kB view details)

Uploaded Source

greenlet-0.3.4.win32-py2.6.exe (211.6 kB view details)

Uploaded Source

greenlet-0.3.4.win32-py2.5.exe (75.4 kB view details)

Uploaded Source

greenlet-0.3.4.win32-py2.4.exe (75.3 kB view details)

Uploaded Source

greenlet-0.3.4-py3.2-win-amd64.egg (12.4 kB view details)

Uploaded Source

greenlet-0.3.4-py3.2-win32.egg (11.9 kB view details)

Uploaded Source

greenlet-0.3.4-py3.1-win-amd64.egg (12.4 kB view details)

Uploaded Source

greenlet-0.3.4-py3.1-win32.egg (11.9 kB view details)

Uploaded Source

greenlet-0.3.4-py3.0-win32.egg (12.0 kB view details)

Uploaded Source

greenlet-0.3.4-py2.7-win-amd64.egg (12.5 kB view details)

Uploaded Source

greenlet-0.3.4-py2.7-win32.egg (12.0 kB view details)

Uploaded Source

greenlet-0.3.4-py2.6-win32.egg (12.0 kB view details)

Uploaded Source

greenlet-0.3.4-py2.5-win32.egg (10.4 kB view details)

Uploaded Source

greenlet-0.3.4-py2.4-win32.egg (10.3 kB view details)

Uploaded Source

File details

Details for the file greenlet-0.3.4.zip.

File metadata

  • Download URL: greenlet-0.3.4.zip
  • Upload date:
  • Size: 63.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for greenlet-0.3.4.zip
Algorithm Hash digest
SHA256 259ed0f34de9b0c948f42bdaffe378ea53d210d38377c6dcb0c6b728fccad1b0
MD5 530a69acebbb0d66eb5abd83523d8272
BLAKE2b-256 8e763c2e10a78383cc8c7f97628e36eebfcc0e54b7c4eea7a9639e0b8e35330a

See more details on using hashes here.

File details

Details for the file greenlet-0.3.4.win-amd64-py3.2.exe.

File metadata

File hashes

Hashes for greenlet-0.3.4.win-amd64-py3.2.exe
Algorithm Hash digest
SHA256 8f98805dba10173f93a27faed876179d04d60136e3dbe5fa2387c2592f812e4c
MD5 fb0418279e07f08077b8070b8d660738
BLAKE2b-256 12662b635534355a1b4f2b6f33edde789c70a7a1d59555e267968aa99394a1fe

See more details on using hashes here.

File details

Details for the file greenlet-0.3.4.win-amd64-py3.1.exe.

File metadata

File hashes

Hashes for greenlet-0.3.4.win-amd64-py3.1.exe
Algorithm Hash digest
SHA256 4e6c977cc962f01e95f949bc6d10bb93386788c2e22c68c8f22001ef5eeab58a
MD5 a0cf9da5746cd9f1c17fe0faf9512887
BLAKE2b-256 d30af967db58d4525511bd80593c2bcda851fe0d24ddd5a6571af9934bde6bf6

See more details on using hashes here.

File details

Details for the file greenlet-0.3.4.win-amd64-py2.7.exe.

File metadata

File hashes

Hashes for greenlet-0.3.4.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 1aed6e7b96d6b3ef54d329a0547477cb13a8b66159f57e37dd0849f98c3cfc03
MD5 cf44638d879a92fb135306890e38903b
BLAKE2b-256 c54692385a554b0d681c0ab3ad404925d1a0877f9d5586374863995b923c5096

See more details on using hashes here.

File details

Details for the file greenlet-0.3.4.win32-py3.2.exe.

File metadata

File hashes

Hashes for greenlet-0.3.4.win32-py3.2.exe
Algorithm Hash digest
SHA256 711be2380b5423738a2af8fc2b030a665c1ecb884062b5a471c23aa938937fab
MD5 19163324432f8383651ac1b6903e9427
BLAKE2b-256 136076f5633902e605f93642dd50ccb47053fd8680ebe5f3452ee3745c94ef4a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.4.win32-py3.1.exe
Algorithm Hash digest
SHA256 9fd3a474bbc89b1a1132425e3e5a7a9846901c22c756f73d4678ec0cc691af16
MD5 7155009368cfc802bd7d45b722e323aa
BLAKE2b-256 3feceb5eb41fded4af4db3ff78d123e6e3bc0056441ae7e3ff1b8000ecb5930b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.4.win32-py3.0.exe
Algorithm Hash digest
SHA256 2540e8c2f2f34a2b5149c42ebb9d3730ef5eb9f24e398a523f3b4ecaf1e3ba7a
MD5 6f2729ae18335d8fdf8a46c6ee208569
BLAKE2b-256 3b512f6140a9ed19b045eb8a617e6067ea496d629b0133317681ecbfe2aaa137

See more details on using hashes here.

File details

Details for the file greenlet-0.3.4.win32-py2.7.exe.

File metadata

File hashes

Hashes for greenlet-0.3.4.win32-py2.7.exe
Algorithm Hash digest
SHA256 c78429636bbc555a1be6ed2c8219638574311c01a54c560989fa7dbd539ba5f3
MD5 a015c3327982470e04d778b498cb494c
BLAKE2b-256 44c5e73f48c81e47b63c6527693934790a955dba0f85f444124d1a05c7e3c851

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.4.win32-py2.6.exe
Algorithm Hash digest
SHA256 dde71a3c4eedefb9b2c0087dc47b4f2cb177d72a4527ed0cbbc54df6719a46ae
MD5 56af1230b4abdc24a3f1abf8d383f9fa
BLAKE2b-256 6b821f179faba4709aac7e4f231923e623d0d6d4b74d6394778c903fcb23039c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.4.win32-py2.5.exe
Algorithm Hash digest
SHA256 7159705a8e2921c5dc5949dd3600cddc5ff16f83b65ab5c4482190b99719096f
MD5 f5b6ae0ed86a30a074cae090233f79ce
BLAKE2b-256 b9af260a450dfb09ef75a539fbb00f40a2fe5a927b070e89a353994099a0c112

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.4.win32-py2.4.exe
Algorithm Hash digest
SHA256 c354b4a55d5d86b134f3aae965eda854d65b35b2e359087efa45c03b8c0b54c5
MD5 9ba336c5ac5d20ae1bcf1d5974f158f1
BLAKE2b-256 81caf9b939688e0339a30cd3f743ba7819064d1b062634dcf1a1253c740f1ca0

See more details on using hashes here.

File details

Details for the file greenlet-0.3.4-py3.2-win-amd64.egg.

File metadata

File hashes

Hashes for greenlet-0.3.4-py3.2-win-amd64.egg
Algorithm Hash digest
SHA256 28dcb0b24d3f3d46975f5c3d95183dedfeda7f5e2c709681787ec40969c2b836
MD5 14455b258e92d17ccf18ccbcada22932
BLAKE2b-256 a342e7ea0d4efb91502802c688b02f77fbccb57ea962e3eb1756c91ddbaf71e2

See more details on using hashes here.

File details

Details for the file greenlet-0.3.4-py3.2-win32.egg.

File metadata

File hashes

Hashes for greenlet-0.3.4-py3.2-win32.egg
Algorithm Hash digest
SHA256 81cc8487e741c5bb874db561d93bbdcf5fa022ee002122786873a05c1789bddb
MD5 3d78a86a109c26e11f6cd6c4c34805a6
BLAKE2b-256 bdfec5be5addd299ca8e852a69fe8442f62adef20c1b0e3d6e6da436cc0c0ebb

See more details on using hashes here.

File details

Details for the file greenlet-0.3.4-py3.1-win-amd64.egg.

File metadata

File hashes

Hashes for greenlet-0.3.4-py3.1-win-amd64.egg
Algorithm Hash digest
SHA256 afcd2c347e99bc451c6a469353c0aba2c0b1fcc1014909e985948a7989cec070
MD5 0b37cadd7aa49db5335cc7ee5fe6ca36
BLAKE2b-256 f4eb5b3d6a1721bb1d2a1ceeebc4e7e05ddf8cdfccec10a636945d04025ce2ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.4-py3.1-win32.egg
Algorithm Hash digest
SHA256 7af98d5858655426fd8b7f35314e3bbaa12a7aeac3536e651343615c3e905e06
MD5 1c61596bd78eb191e51af4e853b7113d
BLAKE2b-256 d1b05ed3333c417e431334c08f194b6bd1fd519e03faf3bfc4af98f689924b7e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.4-py3.0-win32.egg
Algorithm Hash digest
SHA256 61e04de0a4065fc2607d0f27b1a2d28af33acd0e2c77e5cf48f232c78bd2cd63
MD5 e728f5aad40cb478045340ab134e5a6b
BLAKE2b-256 6952ebc9d8cd30d36b694683906bd9598286cde6b8f8b094951d47e7d6762241

See more details on using hashes here.

File details

Details for the file greenlet-0.3.4-py2.7-win-amd64.egg.

File metadata

File hashes

Hashes for greenlet-0.3.4-py2.7-win-amd64.egg
Algorithm Hash digest
SHA256 907016d04b48a5370ff12bb0c407c30280e72886f3d5342589db18928d28368c
MD5 9a4215d99a0dce433a29f1f309588569
BLAKE2b-256 1922a44dcfc8dbbc1f173733826afcc6a4bb4e5af30cce4a71515b04db334ff2

See more details on using hashes here.

File details

Details for the file greenlet-0.3.4-py2.7-win32.egg.

File metadata

File hashes

Hashes for greenlet-0.3.4-py2.7-win32.egg
Algorithm Hash digest
SHA256 da9816a8f3588728ab0658b308f7a6a803c8f155e240349bfd5e836bc3a78f0a
MD5 9941aa246358c586bb274812ee130629
BLAKE2b-256 128fa5c4e60a006a1007314e3ffc6b4921e0160bddae0859bfd70a8b0ab76ff9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.4-py2.6-win32.egg
Algorithm Hash digest
SHA256 db11115c0f47e266eac0e808dc3a6cd810ec7df1a0f6c74ab5fbfee4d132d4ad
MD5 f58e3fffbedbe9fd34b3d83ea891681c
BLAKE2b-256 ae2103b85d832008fb850be09f6d107784eb98b71e9dbbf6f559aa3ff3e97f61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.4-py2.5-win32.egg
Algorithm Hash digest
SHA256 cd57273c73a4dc9868ddd5867ba73cca49e90060f0706e7ad3ec6267618125e8
MD5 38c5f7ce926d4d5366a5a5715bf1b033
BLAKE2b-256 8de6b841392a279a50d02d3de779ff40bd63dddceb6e7f26d56d13aa9cdf97b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.3.4-py2.4-win32.egg
Algorithm Hash digest
SHA256 4429fa4d68d2f02f2fc4bd72e09dc08b53e26a5fbc465e5c8901b00af2529a5d
MD5 f0bbf7f97eacdad124206b9724d07a3d
BLAKE2b-256 6b35ddb75508c8c7956c84ad136b6a05297b7c22942a5a9afc522ab61e28ee22

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