File: current_descriptors.py

package info (click to toggle)
python-stem 1.8.1-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,152 kB
  • sloc: python: 33,747; java: 312; makefile: 124; sh: 14
file content (7 lines) | stat: -rw-r--r-- 238 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
import stem.descriptor.remote

try:
  for desc in stem.descriptor.remote.get_consensus():
    print("found relay %s (%s)" % (desc.nickname, desc.fingerprint))
except Exception as exc:
  print("Unable to retrieve the consensus: %s" % exc)