1from stem.descriptor.server_descriptor import RelayDescriptor 2 3# prints 'caerSidi (71.35.133.197:9001)' 4desc = RelayDescriptor.create() 5print("%s (%s:%s)" % (desc.nickname, desc.address, desc.or_port)) 6 7# prints 'demo (127.0.0.1:80)' 8desc = RelayDescriptor.create({'router': 'demo 127.0.0.1 80 0 0'}) 9print("%s (%s:%s)" % (desc.nickname, desc.address, desc.or_port)) 10