# Green mode

PyTango supports cooperative green Tango objects. Since version 8.1 two green modes have been added: `Futures` and `Gevent`. In version 9.2.0 another one has been added: `Asyncio`.

Note

The preferred mode to use for new projects is `Asyncio`. Support for this mode will take priority over the others.

The `Futures` uses the standard python module `concurrent.futures`. The `Gevent` mode uses the well known gevent library. The newest, `Asyncio` mode, uses asyncio - a Python library for asynchronous programming (it’s featured as a part of a standard Python distribution since version 3.5 of Python; it’s available on PyPI for older ones).

You can set the PyTango green mode at a global level. Set the environment variable `PYTANGO_GREEN_MODE` to either futures, gevent or asyncio (case-insensitive). If this environment variable is not defined the PyTango global green mode defaults to Synchronous.