Damian Johnson atagar@torproject.org writes:
they'd care to go (potentially all the way up to a Python Tor client, similar to Orchid).
So, there is this already -- not sure how "complete" it is though (and looks like hasn't seen commits for 2+ years) but might have useful code:
https://github.com/pycepa/pycepa
There is also this one, that I've barely looked at (and is older than the above) based around Scapy:
https://github.com/cea-sec/TorPylle
For any of these efforts, writing a "Tor protocol library" that *doesn't* do any I/O would be the most useful; then other Python tools can benefit from the protocol support without being tied to "threads" or to a particular async framework.
One of the best examples of this style of library is the hyper/h2 implementation of HTTP2 (which powers Twisted's HTTP2 support and also supports threaded HTTP2 servers and clients) by separating the "protocol" implementation into its own library (that does no I/O and doesn't start any threads "for" you). This style is usually referred to as "sans-io" (at least in the Python community). You can read more about these libraries: https://python-hyper.org
It would be really cool to have a Python implementation of the Tor protocol -- and double-extra-useful if it's a "pure" protocol library without any messy I/O constructs involved :)
Cheers, meejah