ZeroNet/src/lib/subtl
HelloZeroNet 7d25812087 Rev859, Don't display port closed warning in Tor always mode, Reload trackers files every minute, Log users.json save time, Use Udp connect to avoid Gevent lockdown bug, Site needfile startup command, Log uPnP punch targets 2016-01-19 20:42:00 +01:00
..
LICENCE First release, remove not used lines from gitignore 2015-01-12 02:03:45 +01:00
README.md First release, remove not used lines from gitignore 2015-01-12 02:03:45 +01:00
__init__.py First release, remove not used lines from gitignore 2015-01-12 02:03:45 +01:00
subtl.py Rev859, Don't display port closed warning in Tor always mode, Reload trackers files every minute, Log users.json save time, Use Udp connect to avoid Gevent lockdown bug, Site needfile startup command, Log uPnP punch targets 2016-01-19 20:42:00 +01:00

README.md

subtl

Overview

SUBTL is a simple UDP BitTorrent tracker library for Python, licenced under the modified BSD license.

Example

This short example will list a few IP Addresses from a certain hash:

from subtl import UdpTrackerClient
utc = UdpTrackerClient('tracker.openbittorrent.com', 80)
utc.connect()
if not utc.poll_once():
    raise Exception('Could not connect')
print('Success!')

utc.announce(info_hash='089184ED52AA37F71801391C451C5D5ADD0D9501')
data = utc.poll_once()
if not data:
    raise Exception('Could not announce')
for a in data['response']['peers']:
    print(a)

Caveats

  • There is no automatic retrying of sending packets yet.
  • This library won't download torrent files--it is simply a tracker client.