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 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.4.2.zip (74.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

greenlet-0.4.2.win-amd64-py3.3.exe (238.3 kB view details)

Uploaded Source

greenlet-0.4.2.win-amd64-py2.7.exe (239.9 kB view details)

Uploaded Source

greenlet-0.4.2.win32-py3.3.exe (206.3 kB view details)

Uploaded Source

greenlet-0.4.2.win32-py2.7.exe (211.5 kB view details)

Uploaded Source

greenlet-0.4.2.win32-py2.6.exe (211.8 kB view details)

Uploaded Source

greenlet-0.4.2.win32-py2.5.exe (75.6 kB view details)

Uploaded Source

greenlet-0.4.2-cp33-none-win_amd64.whl (15.9 kB view details)

Uploaded CPython 3.3Windows x86-64

greenlet-0.4.2-cp33-none-win32.whl (15.1 kB view details)

Uploaded CPython 3.3Windows x86

greenlet-0.4.2-cp27-none-win_amd64.whl (16.0 kB view details)

Uploaded CPython 2.7Windows x86-64

greenlet-0.4.2-cp27-none-win32.whl (15.2 kB view details)

Uploaded CPython 2.7Windows x86

File details

Details for the file greenlet-0.4.2.zip.

File metadata

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

File hashes

Hashes for greenlet-0.4.2.zip
Algorithm Hash digest
SHA256 b160e556a22e16bae3f3f63ffce7898682c803cd896457192f7b54fe74fe991e
MD5 580a8a5e833351f7abdaedb1a877f7ac
BLAKE2b-256 1146ce7c6f01fba12f86924f4e5b7730652322c8e6069d69f479ade516785c4f

See more details on using hashes here.

File details

Details for the file greenlet-0.4.2.win-amd64-py3.3.exe.

File metadata

File hashes

Hashes for greenlet-0.4.2.win-amd64-py3.3.exe
Algorithm Hash digest
SHA256 6519f2a84f62d150fc660e6e4c55c0d68ba65e0a6eac5eb05bbd9a0dc5cb51a7
MD5 e563c455705a5c05b05279b16467efb9
BLAKE2b-256 8fe7a3c9d438b6d98968a1db8e64fa0a7ebfa5ab670912ffc38441008c93f012

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.4.2.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 2a1f122133c113f21188c6f07ffec0a75dbddab45d9f398216532cfde74ce0da
MD5 ecf74a210b67842e4759a8d81ad5ca62
BLAKE2b-256 007363fa90c85f94c2deebe229d940da56148bababc8678d3109bd3ff67f1ace

See more details on using hashes here.

File details

Details for the file greenlet-0.4.2.win32-py3.3.exe.

File metadata

File hashes

Hashes for greenlet-0.4.2.win32-py3.3.exe
Algorithm Hash digest
SHA256 1d5c590c42fbc250e5154440952227d7240a953c735c5f667f3b8ddde9b3885e
MD5 9771421e3d81bc02f4cc57fd9328882d
BLAKE2b-256 5cc272fe4d8367755798b20b4b267a580b777097b4657ae8c99cbe63d674c52c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.4.2.win32-py2.7.exe
Algorithm Hash digest
SHA256 e3fe9e0c7fbae2a6f3f5da8a9ac105a32300b2d891df69e0993cc9d52022c410
MD5 0ea8f5a14f8554919e1a136bc042d76c
BLAKE2b-256 5ddc7762cfd21091a503094f1e26e4206db7073051b2c10e7957434f51322b62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.4.2.win32-py2.6.exe
Algorithm Hash digest
SHA256 69b8887c391c72727345d27ab9208e9b93c45e6ecb45c80457dd178e54b49e6e
MD5 4ab96dc78160ad09adfc6f841cc44fd2
BLAKE2b-256 77a20e41cb3ba526c78fd65175bb87240aad70a792bd4308f54c25b16f2f8fc6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for greenlet-0.4.2.win32-py2.5.exe
Algorithm Hash digest
SHA256 6b1e20a871ad6ec098a925e44f8a0a013016c17fca99c8c0b361f67d60af080a
MD5 78d7957b2a6f9c64295708d070b42b7f
BLAKE2b-256 eb8375fcd458528fce9d15fc85a0873ab6603d8854b1fc15ec5279958a9f7a5f

See more details on using hashes here.

File details

Details for the file greenlet-0.4.2-cp33-none-win_amd64.whl.

File metadata

File hashes

Hashes for greenlet-0.4.2-cp33-none-win_amd64.whl
Algorithm Hash digest
SHA256 19f5d77ba77311d969d9008f2ed6ed172c911655d70ea2384466144ca379b149
MD5 5828bfff73f65b9c0334d8d361a937e7
BLAKE2b-256 88aaaef946c33430cd36a866cf2251f6ede902b3d53e5db2a08440bf6d196874

See more details on using hashes here.

File details

Details for the file greenlet-0.4.2-cp33-none-win32.whl.

File metadata

File hashes

Hashes for greenlet-0.4.2-cp33-none-win32.whl
Algorithm Hash digest
SHA256 43d4de9776fe089aa822d54cc7103b5b403e725c13c2afd074551924416c3c5d
MD5 20cbec64e2919d48890530fc73873314
BLAKE2b-256 b66e612c9c49e56bb7fcd3af36f2861ca08798b49bcd14fc7f418a1679772319

See more details on using hashes here.

File details

Details for the file greenlet-0.4.2-cp27-none-win_amd64.whl.

File metadata

File hashes

Hashes for greenlet-0.4.2-cp27-none-win_amd64.whl
Algorithm Hash digest
SHA256 a4536aee72713dff677998b2374ef0c282389345aa1485120d487d5558e328c4
MD5 2578fbcc9fa14997cb69af969b2faadb
BLAKE2b-256 2249bc181cbcfd46c1128c44f0380a6317f9694a684bd98ef38d75bf9a19b04a

See more details on using hashes here.

File details

Details for the file greenlet-0.4.2-cp27-none-win32.whl.

File metadata

File hashes

Hashes for greenlet-0.4.2-cp27-none-win32.whl
Algorithm Hash digest
SHA256 298d45c49c7aaa188271d89e00f13c10bdf2904263400a9308bd8b410b6593d8
MD5 fbfdd3d8dec8323ff6b3467c8931d7c4
BLAKE2b-256 210aea79121efece1e1e8dc7d049e7c0fe293e9260d654136bce1428d9fda757

See more details on using hashes here.

Supported by

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