API¶
Controller¶
- Core
- stem.control - Controller used to talk with Tor.
- stem.connection - Connection and authentication to the Tor control socket.
- stem.socket - Low level control socket used to talk with Tor.
- stem.process - Launcher for the Tor process.
- stem.response - Messages that Tor may provide the controller.
- Types
- stem.exit_policy - Relay policy for the destinations it will or won't allow traffic to.
- stem.manual - Information available about Tor from its manual.
- stem.version - Tor versions that can be compared to determine Tor's capabilities.
Descriptors¶
To read descriptors from disk use parse_file() for individual files and stem.descriptor.reader for batches. You can also use stem.descriptor.remote to download descriptors remotely like Tor does.
- Classes
- stem.descriptor - Base class for descriptors.
- stem.descriptor.server_descriptor - Relay and bridge server descriptors.
- stem.descriptor.extrainfo_descriptor - Relay and bridge extrainfo descriptors.
- stem.descriptor.microdescriptor - Minimalistic counterpart for server descriptors.
- stem.descriptor.networkstatus - Network status documents which make up the Tor consensus.
- stem.descriptor.router_status_entry - Relay entries within a network status document.
- stem.descriptor.hidden_service - Descriptors generated for hidden services.
- stem.descriptor.bandwidth_file - Bandwidth authority metrics.
- stem.descriptor.tordnsel - TorDNSEL exit lists.
- stem.descriptor.certificate - Ed25519 certificates.
- stem.directory - Directory authority and fallback directory information.
- stem.descriptor.reader - Reads and parses descriptor files from disk.
- stem.descriptor.remote - Downloads descriptors from directory mirrors and authorities.
- stem.descriptor.collector - Downloads past descriptors from CollecTor.
- stem.descriptor.export - Exports descriptors to other formats.
Utilities¶
- stem.util.conf - Configuration file handling.
- stem.util.connection - Connection and IP related utilities.
- stem.util.enum - Enumeration class.
- stem.util.proc - Resource and connection usage via proc contents.
- stem.util.str_tools - String utilities.
- stem.util.system - Tools related to the local system.
- stem.util.term - Tools for interacting with the terminal.
- stem.util.test_tools - Static analysis checks and tools to help with test runs.
- stem.util.tor_tools - Miscellaneous toolkit for working with tor.