Reactor Basics

The reactor is the core of the event loop within Twisted and provides a basic interface to a number of services, including network communications, threading, and event dispatching.

There are multiple implementations of the reactor, each modified to provide better support for specialized features over the default implementation. More information about these and how to use a particular implementation is available via Choosing a Reactor.

You can get to the reactor object using the following code:

from twisted.internet import reactor

The reactor usually implements a set of interfaces, but depending on the chosen reactor and the platform, some of the interfaces may not be implemented: