Stem is a Python controller library that allows applications to interact with Tor (https://www.torproject.org/).
Stem is a Python controller library for Tor. With it you can use Tor's control protocol to script against the Tor process, or build things such as Nyx. Stem's latest version is 1.6.0 (released November 5th, 2017).