Coroutine-based network library
Project description
gevent
gevent is a coroutine -based Python networking library that uses greenlet to provide a high-level synchronous API on top of the libev or libuv event loop.
Features include:
Lightweight execution units based on greenlets.
API that re-uses concepts from the Python standard library (for examples there are events and queues).
Cooperative DNS queries performed through a threadpool, dnspython, or c-ares.
Monkey patching utility to get 3rd party modules to become cooperative
TCP/UDP/HTTP servers
Subprocess support (through gevent.subprocess)
Thread pools
gevent is inspired by eventlet but features a more consistent API, simpler implementation and better performance. Read why others use gevent and check out the list of the open source projects based on gevent.
gevent was written by Denis Bilenko.
Since version 1.1, gevent is maintained by Jason Madden for NextThought with help from the contributors and is licensed under the MIT license.
See what’s new in the latest major release.
Check out the detailed changelog for this version.
Read the documentation online at http://www.gevent.org.
Post issues on the bug tracker, discuss and ask open ended questions on the mailing list, and find announcements and information on the blog and twitter (@gevent).
Installation and Requirements
Supported Platforms
This version of gevent runs on Python 2.7.9 and up, and Python 3.5, 3.6, 3.7 and 3.8. gevent requires the greenlet library and will install the cffi library by default on Windows. The cffi library will become the default on all platforms in a future release of gevent.
This version of gevent also runs on PyPy 7.0 or above. On PyPy, there are no external dependencies.
gevent is tested on Windows, macOS, and Linux, and should run on most other Unix-like operating systems (e.g., FreeBSD, Solaris, etc.)
Older Versions of Python
Users of older versions of Python 2 or Python 3 may install an older version of gevent. Note that these versions are generally not supported.
Python Version |
Gevent Version |
---|---|
2.5 |
1.0.x |
2.6 |
1.1.x |
<= 2.7.8 |
1.2.x |
3.3 |
1.2.x |
3.4.0 - 3.4.2 |
1.3.x |
3.4.3 |
1.4.x |
Installation
gevent and greenlet can both be installed with pip, e.g., pip install gevent. Installation using buildout is also supported.
On Windows, macOS, and Linux, both gevent and greenlet are distributed as binary wheels.
Installing From Source
If you are unable to use the binary wheels (for platforms where no pre-built wheels are available or if wheel installation is disabled), you can build gevent from source. A normal pip install will fall back to doing this if no binary wheel is available. See Installing From Source for more, including common installation issues.
Extra Dependencies
There are a number of additional libraries that extend gevent’s functionality and will be used if they are available. All of these may be installed using setuptools extras, as named below, e.g., pip install gevent[events].
- events
In versions of gevent up to and including 20.5.0, this provided configurable event support using zope.event and was highly recommended.
In versions after that, this extra is empty and does nothing. It will be removed in gevent 21.0.
- dnspython
Enables the new pure-Python resolver, backed by dnspython. On Python 2, this also includes idna. They can be installed with the dnspython extra.
- monitor
Enhancements to gevent’s self-monitoring capabilities. This includes the psutil library which is needed to monitor memory usage. (Note that this may not build on all platforms.)
- recommended
A shortcut for installing suggested extras together. This includes the non-test extras defined here, plus:
backports.socketpair on Python 2/Windows (beginning with release 20.6.0);
selectors2 on Python 2 (beginning with release 20.6.0).
- test
Everything needed to run the complete gevent test suite.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for gevent-21.1.1-cp39-cp39-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28acca34e18e9c86e44268f3add6bb5841bbcc276b47ae19c957d0019eb23578 |
|
MD5 | 03e8f996c0aa96f1fa2084f5b196814b |
|
BLAKE2b-256 | bfa360e64d1fc6de41c807a3432f943f339f2baecc8d011e161b724dd51ba9bc |
Hashes for gevent-21.1.1-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 579edc34acbd8cd1d60a5e1d5d0b0deb30de87bb036cc27e4f2a12c005d6238c |
|
MD5 | 1116a960ed33793c99f0946671174d67 |
|
BLAKE2b-256 | 0ec44131ef24a024df7a57ccb0e02818ded8e103c7ef79ff17372ec38cd6abbf |
Hashes for gevent-21.1.1-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69af9486d19a97cd0311ac01541facd5393e00d2fffdacf9532e8f5a81da67aa |
|
MD5 | 1a2d9dedf86d392c52e7d8b5fcfaca46 |
|
BLAKE2b-256 | 3730a40d1975043a50ad09ed9c78a8066af486fb8a65fc751101ef7291c7e65d |
Hashes for gevent-21.1.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 169860426bdd6565862abc0dd5d87625d71a029e608a82f242b3ee1455df4b06 |
|
MD5 | 38a6bb63a5a90bf50676fd6933a7e3d4 |
|
BLAKE2b-256 | 4a3ab0fed14e4bd45932535106a15202e9f271cb552de674e667bd559cef4861 |
Hashes for gevent-21.1.1-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1456955cafec07232874fbf4247ec5bc336d21a772e79b4d0bb9808e5411a7e0 |
|
MD5 | 39717643bf6fc9397285ba5bc5459091 |
|
BLAKE2b-256 | 26fe0a897e3a8e531a1ee263f9505e516bf7513162dae58a8d18bc6177db6ace |
Hashes for gevent-21.1.1-cp38-cp38-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73d6b1a4a81c9eca6898c44f109afa010ef1bba82e631ff0bbf8f12d89306341 |
|
MD5 | ee0319a82978e84743564c1886aea53b |
|
BLAKE2b-256 | 2f621565494412140cfedd8793fa98316b01d10f6c795a0ba44946b13d175e54 |
Hashes for gevent-21.1.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27b5dbb6e5ccd0d49092b0b51ba31ab86640946dbdd3eb1a86c96ea56e68e2bf |
|
MD5 | 947f83a53edc4405f41a5ef4235cfbc1 |
|
BLAKE2b-256 | f551afc014fd94a55c29fa5808678eaf7fc2650e30a7d4634ff1a76c7b184d74 |
Hashes for gevent-21.1.1-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ea488254b726603ee9c7d12ad0e664d5a23e0857e30007e38ef791de97d70d5 |
|
MD5 | 9fce2788dc28e13cb9c7585f1328a69d |
|
BLAKE2b-256 | c8f7ec67a86400694d404834acb0d50546ef035f0ae36a2d0955887647b6f09a |
Hashes for gevent-21.1.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 888a359404f206e73eb209043f48cec5e40c473d1f3a01bf4ec71d27a1e17752 |
|
MD5 | f27d7ffdc07563e9cf253ad536571b4f |
|
BLAKE2b-256 | 80d21de59826c366630383dca209087fd1001233e66711ff4c5b3da007c2f825 |
Hashes for gevent-21.1.1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15c33a69bb81008a4a1fb64a2506c64cb6b203e391ea87f683e01b1078e612c1 |
|
MD5 | 4ea1229ec037b4e5d51d58d3146fffdd |
|
BLAKE2b-256 | 999f2e1ab8664004ecc25dcb2926759bcd3a3f2f2d8d5365d1540691ecc98fa3 |
Hashes for gevent-21.1.1-cp37-cp37m-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6672781ee535c7232db093a3a11a42dd8d20b369920f15b1240487774e86aa75 |
|
MD5 | a70be3fb4b125006091e8a995b4b6327 |
|
BLAKE2b-256 | 32a4931c360e81c1c1b4282e57b3efb4f2ce6827ee49949622b01faf9d17a0c0 |
Hashes for gevent-21.1.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c34b66b74fb140c7d06cbde071c5bad4f39d7065e47a92329ebd86c6d3a06049 |
|
MD5 | 44f2fc427f64d1ffcb945db100e31697 |
|
BLAKE2b-256 | fb1acea85451fdf498e5dfec1e8d930a2fab21aa4328b698e1e868a85df8747f |
Hashes for gevent-21.1.1-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7c471f6ef22c9eb93843ba155b944b7be7b5336648b427cb24808bee5bc7008 |
|
MD5 | cba44bcfa8a256016d58e48b20bbc6c6 |
|
BLAKE2b-256 | 3222b3f32c9e19604966dc3250b5de74e1045c72dbe3416c6fae74e1b3f6dc82 |
Hashes for gevent-21.1.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02ef6045fd5fa73814e5147ff804d8d4b9f7c10138082be22a993f58a6437a05 |
|
MD5 | abeed65d97337336e9f309b84ad191af |
|
BLAKE2b-256 | 4514572a2fd196fcf905dbf959ae6b91e522710ff6bced94025730167c645bc9 |
Hashes for gevent-21.1.1-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a25ad2231380a8966715ee99f1a4c054984b58d0fd4d186e990be87a6c7b2cc9 |
|
MD5 | c3aa0b09f05b0a7bcb4ba343615ea1a2 |
|
BLAKE2b-256 | e1124eef1ea6e0223e04cc0a7997227648e6d4f154c9b657a72eeb824190d276 |
Hashes for gevent-21.1.1-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8072fb959100acd30869f0c6bb65168dcf7980be2ee886e41476c3329e72b2c0 |
|
MD5 | 8b67cd918d9def4902f41f1344fc96de |
|
BLAKE2b-256 | 1ae177c027b26a30bf92d6404de0c82113a38bfcaced8de521099a6858de908e |
Hashes for gevent-21.1.1-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2fbbb5fb41d7d553cfde8291441e135929a3d7293de3ecb741e69dd8bfb95c3 |
|
MD5 | 05010d0913b4751df038179e844fdcdb |
|
BLAKE2b-256 | 2eeb5cd6484e84d7623de2bb46e55290b9404755b2af580b4430aaabc6649b47 |
Hashes for gevent-21.1.1-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8ff1221b539aa1501488fc38796bdbe389afbc3a28cd934f439f3ad70e89790 |
|
MD5 | b73dfa13ecfd289ab7ac0261a3d85b89 |
|
BLAKE2b-256 | 707c72b3e152c81fa00e3e492818323998efc0ed70e6a3dfd51f0a0bf1ac39d2 |
Hashes for gevent-21.1.1-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 129c3de17ea2c5a20847dc0d9b813d7ade2d753add024a5154ead77564680ff4 |
|
MD5 | 4a6a8cb096a0e8f58d6abdbf3adf5c6f |
|
BLAKE2b-256 | 707366d8b4732ee83a654d665fe3c813115983bd3c29223e16121cda6982ae31 |
Hashes for gevent-21.1.1-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6abd5514fa5bea708d75657ee5cdaaef87e514a99661247c8871a257c38efd5f |
|
MD5 | ccb919da7d494a7b8254b944a7b35936 |
|
BLAKE2b-256 | 803cc39f36088ac3ecdc2b826646fd7cd60001d0fc8743178673c4109fcd7aa2 |
Hashes for gevent-21.1.1-cp27-cp27m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6607a567d98ddcff615ccbeb9c8e824821a0502e6d006862b9040277eecea34 |
|
MD5 | 1d8ff7410074eeb6aeca17da5bf1e176 |
|
BLAKE2b-256 | 04a6a6ea8ae77da63c9e01a1b4106c8583a78547acb4978c86326ee660d02849 |
Hashes for gevent-21.1.1-cp27-cp27m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 755b09fb3915737fab331cd3fd2fd5e0776c044d5da6190997d295ca485aa82a |
|
MD5 | b3771d33069c2433dc95994d3a499f2a |
|
BLAKE2b-256 | 46d0299dfee47cdfd299d53758dd1ab8e9847dda892af873866b5912fbef62cd |