This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

pybtracker is a UDP BitTorrent tracker written in Python 3.5 using co-routines and the asyncio module. You can use the tracker in a script like this:

from pybtracker import TrackerServer

loop = asyncio.get_event_loop()
tracker = TrackerServer(local_addr=('127.0.0.1', 8000), loop=loop)
asyncio.ensure_future(tracker.start())
try:
    loop.run_forever()
except KeyboardInterrupt:
    loop.run_until_complete(tracker.stop())

It also includes a UDP tracker client:

from pybtracker import TrackerClient

async def announce():
    client = TrackerServer(local_addr='udp://127.0.0.1:8000', loop=loop)
    await client.start()
    peers = await client.announce(
        b'01234567890123456789',  # infohash
        10000,                    # downloaded
        40000,                    # left
        5000,                     # uploaded
        0,                        # event (0=none)
        120                       # number of peers wanted
    )
    print(peers)

loop = asyncio.get_event_loop()
loop.run_until_complete(announce())

You can run the server independently by running:

$ python -m pybtracker.server -b 127.0.0.1:8000 -O

The client can also be run independently and it provides you with a shell to interact with the server:

$ python -m pybtracker.client udp://127.0.0.1:8000
BitTorrent tracker client. Type help or ? to list commands.

(btrc) help
Documented commands (type help <topic>):
========================================
EOF  announce  connect  help  quit

(btrc) quit
$

If you have installed pybtracker using pip or setup.py, you can also run pybtracker and pybtracker-client instead of using python -m.

Release History

Release History

0.1.4

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pybtracker-0.1.4.tar.gz (8.4 kB) Copy SHA256 Checksum SHA256 Source Mar 12, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting