Skip to main content

Wraps the Torrent Stream

Project description

Wraps the Torrent Stream


Install a stable version:

pip install django-torrent-stream

Or install an alpha version:

pip install -e git://

Add to



# You can specify size of player
    'width': '650px',
    'height': '342px',

These KEY and ID you can get on a page

Add to

urlpatterns += patterns(
    url(r'^ts/', include('torrent_stream.urls'))

For inclusion the torrent_stream.views. Remember, you can change the prefix r'ts/' on anything.


For example, you have a model Torrent:

class Torrent(models.Model):
    name = models.CharField(max_length=300, blank=True)
    content = models.FileField(upload_to="torrents/torrents", blank=True)

You can display the button, when clicked, will be available to the player:

{% load torrent_stream %}
{% torrent_stream_button torrent.filename %}


Or you can display a player at once:

{% load torrent_stream %}
{% torrent_stream_player torrent.filename %}

How to get CONTENT_ID

Sometimes you need to get CONTENT_ID, you can do so:

from app.models import Torrent
from torrent_stream.helpers import get_content_id

torrent_obj = Torrent.objects.get(pk=42)

# Enough to transmit the content of the torrent file
content_id = get_content_id(

# Or you can also pass the name of the torrent, and the duration to display the data in the player
content_id = get_content_id(,, duration_in_seconds)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-torrent-stream, version 0.9.3
Filename, size File type Python version Upload date Hashes
Filename, size django-torrent-stream-0.9.3.tar.gz (21.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page