[tor-bugs] #12085 [Tor Weather]: Develop a python wrapper for onionoo services
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri May 30 08:48:24 UTC 2014
#12085: Develop a python wrapper for onionoo services
-----------------------------+-----------------------------
Reporter: sreenatha | Owner:
Type: task | Status: needs_review
Priority: normal | Milestone:
Component: Tor Weather | Version:
Resolution: | Keywords: weather-rewrite
Actual Points: | Parent ID:
Points: |
-----------------------------+-----------------------------
Changes (by sreenatha):
* status: new => needs_review
Comment:
https://github.com/lucyd/tor-weather/tree/onionoo-
wrapper/weather/onionoo_wrapper
After looking at Onion-Py, I made an attempt at developing the onionoo
wrapper. Here is a short introduction on how to use it to fetch onionoo
documents.
{{{
from onionoo_wrapper import *
req = objects.[wiki:OnionooRequest]()
document_type = 'details'
parameters = {
'type': 'relay',
'fields': ['nickname', 'fingerprint']
}
req.build_request(document_type, params=parameters)
resp = req.get_response()
print resp.status_code, resp.document
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/12085#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list