There's a mostly complete implementation in torps, that uses stem. The code isn't very Python-like as afaik it's a straightforward conversion of the tor path selection code. The last time I tried this, downloading and processing all the documents took forever and consumed a hilarious amount of RAM, but I belive stem has seen performance improvements since I tried using it for this.
It has. Stem 1.3.0 had a 40% improvement, and in just a few days it'll get even better. I've been working on a feature branch that does lazy loading of descriptors. Very, very close to being done. I'll be sending an announcement with benchmarks when it's merged.
Cheers! -Damian