Skip to main content

Coroutine-based network library

Project description

gevent

https://travis-ci.org/gevent/gevent.svg?branch=master https://ci.appveyor.com/api/projects/status/q4kl21ng2yo2ixur?svg=true https://coveralls.io/repos/gevent/gevent/badge.svg?branch=master&service=github

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:

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

Note

If you are reading this document on the Python Package Index (PyPI, https://pypi.org/), it is specific to the version of gevent that you are viewing. If you are viewing this document on gevent.org, it refers to the current state of gevent in source control (git master).

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.)

Note

Windows is supported as a tier 2, “best effort,” platform. It is suitable for development, but not recommended for production.

On Windows using the deprecated libev backend, gevent is limited to a maximum of 1024 open sockets due to limitations in libev. This limitation should not exist with the default libuv backend.

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

Note

This section is about installing released versions of gevent as distributed on the Python Package Index. For building gevent from source, including customizing the build and embedded libraries, see Installing From Source.

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.

Tip

You need Pip 8.0 or later, or buildout 2.10.0 to install the binary wheels on Windows or macOS. On Linux, you’ll need pip 19 to install the manylinux2010 wheels.

Tip

Binary wheels cannot be installed on non-manylinux2010 compatible Linux systems, such as those that use musl, including Alpine Linux. Those systems must install from source.

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:

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.

Files for gevent, version 20.6.1
Filename, size File type Python version Upload date Hashes
Filename, size gevent-20.6.1-cp27-cp27m-macosx_10_15_x86_64.whl (1.7 MB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size gevent-20.6.1-cp27-cp27m-manylinux2010_x86_64.whl (4.8 MB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size gevent-20.6.1-cp27-cp27mu-manylinux2010_x86_64.whl (4.8 MB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size gevent-20.6.1-cp27-cp27m-win32.whl (1.3 MB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size gevent-20.6.1-cp27-cp27m-win_amd64.whl (1.5 MB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size gevent-20.6.1-cp35-cp35m-manylinux2010_x86_64.whl (5.2 MB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size gevent-20.6.1-cp35-cp35m-win32.whl (1.3 MB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size gevent-20.6.1-cp35-cp35m-win_amd64.whl (1.4 MB) File type Wheel Python version cp35 Upload date Hashes View
Filename, size gevent-20.6.1-cp36-cp36m-macosx_10_15_x86_64.whl (1.7 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size gevent-20.6.1-cp36-cp36m-manylinux2010_x86_64.whl (5.3 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size gevent-20.6.1-cp36-cp36m-win32.whl (1.3 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size gevent-20.6.1-cp36-cp36m-win_amd64.whl (1.4 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size gevent-20.6.1-cp37-cp37m-macosx_10_15_x86_64.whl (1.8 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size gevent-20.6.1-cp37-cp37m-manylinux2010_x86_64.whl (5.4 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size gevent-20.6.1-cp37-cp37m-win32.whl (1.4 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size gevent-20.6.1-cp37-cp37m-win_amd64.whl (1.5 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size gevent-20.6.1-cp38-cp38-macosx_10_15_x86_64.whl (1.8 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size gevent-20.6.1-cp38-cp38-manylinux2010_x86_64.whl (6.1 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size gevent-20.6.1-cp38-cp38-win32.whl (1.4 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size gevent-20.6.1-cp38-cp38-win_amd64.whl (1.5 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size gevent-20.6.1-cp39-cp39-manylinux2010_x86_64.whl (5.8 MB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size gevent-20.6.1-pp27-pypy_73-win32.whl (812.6 kB) File type Wheel Python version pp27 Upload date Hashes View
Filename, size gevent-20.6.1.tar.gz (5.8 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page