Skip to main content

Basic library for creating torrents

Project description

A basic python library for generating single and multi-file torrents.

Usage

Basic usage:

from makeTorrent import makeTorrent

mk = makeTorrent(announce='http://example.com/announce')

At this point the makeTorrent class contains a dictionary, which can be printed either as a dict or as a bencoded string (torrent format).

To add files, use either the multi_file class or the single_file class:

mk.multi_file('/path/to/directory')

with open('my.torrent') as tf:
    tf.write(mk.getBencoded())

The same method can be used with mk.single_file with just pointing out a single file.

Notes

There are a number of items that can be added when initializing the class:

mk = makeTorrent(
    announce='http://example.com/announce',
    comment='Test Torrent',
    httpseeds=['http://example.com/file.iso'],
    announcelist=[['http://announce1.example.com'],['http://announce2.example.com']]
)

Project details


Download files

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

Source Distribution

makeTorrent-0.14.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file makeTorrent-0.14.tar.gz.

File metadata

  • Download URL: makeTorrent-0.14.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for makeTorrent-0.14.tar.gz
Algorithm Hash digest
SHA256 10fb2d91be49fb04f9aab8b6a40bbd8a3e19877f0bad67086c1479c2a4886184
MD5 dfa3c624984dcb0406556d5487c87972
BLAKE2b-256 20f4c488fcb774aadaa73ffa381065ecc656de8ea094fb9bcab03af30bedced3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page