Stem is a Python controller library that you can use to interact with Tor.
With it you can write scripts and applications with capabilities similar
to nyx.
From a technical standpoint, Stem is a Python implementation of Tor's
directory and control specifications.