Skip to main content

Python wrapper for the TorBox API

Project description

TorBox.py

A Python wrapper for the TorBox API.

Installation

pip install torbox # pip install git+https://github.com/eliasbenb/TorBox.py.git # for the bleeding edge version

Supported API endpoints

Note: Anything marked as supported and tested should work. If something is marked as supportted but not tested, that means it was implemented but not tested to see if it's working as intended yet.

Endpoint Supported Tested
/api/torrents/createtorrent ✔️
/api/torrents/controltorrent ✔️
/api/torrents/controlqueued
/api/torrents/requestdl ✔️
/api/torrents/mylist ✔️ ✔️
/api/torrents/checkcached ✔️ ✔️
/api/torrents/storesearch ✔️
/api/torrents/search ✔️
/api/torrents/exportdata ✔️
/api/torrents/torrentinfo ✔️ ✔️
/api/torrents/getqueued ✔️ ✔️
/api/usenet/createusenetdownload ✔️
/api/usenet/controlusenetdownload ✔️
/api/usenet/requestdl ✔️
/api/usenet/mylist ✔️
/api/usenet/checkcached ✔️
/api/webdl/createwebdownload ✔️
/api/webdl/controlwebdownload ✔️
/api/notifications/rss
/api/notifications/mynotifications
/api/notifications/clear
/api/user/refreshtoken
/api/user/me
/api/user/addreferral
/api/rss/addrss ✔️
/api/rss/controlrss ✔️
/api/rss/modifyrss ✔️
/api/integration/googledrive
/api/integration/dropbox
/api/integration/onedrive
/api/integration/gofile
/api/integration/1fichier
/api/integration/jobs
/api/stats ✔️ ✔️

Usage

Python Library

from torbox import TorBox

# Initialize the TorBox object
torbox = TorBox(api_key="YOUR_API_KEY")

# List torrents
torrents = torbox.torrents.list()

# List all queued torrents
queued_torrents = torbox.torrents.list_queued()

# Create a torrent
torbox.torrents.create(magnet="magnet:?xt=urn:btih:...")
torbox.torrents.create(torrent_file="path/to/file.torrent")

CLI

To use the CLI, run the following for help:

torbox --help

To get help for a specific command, run:

torbox --api-key=<API_KEY> <COMMAND> --help

Commands will follow the following format:

torbox --api-key=<API_KEY> <OPTIONS> <COMMAND> <COMMAND_OPTIONS>

Example Usage

torbox --api-key=<API_KEY> --pretty torrents list_queued
torbox --api-key=<API_KEY> torrents list --bypass_cache
torbox -k <API_KEY> torrents create --magnet="magnet:?xt=urn:btih:..."
torbox -k <API_KEY> torrents create --name="Test Torrent" --torrent_file="path/to/test.torrent"
torbox -k <API_KEY> torrents info --torrent_hash <TORRENT_HASH>

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

torbox-0.1.0a1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

TorBox-0.1.0a1-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file torbox-0.1.0a1.tar.gz.

File metadata

  • Download URL: torbox-0.1.0a1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for torbox-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 532a501fadd013325d1470be182fc448b1fb16d74030498a20cf12fe650c4d5b
MD5 abebf3d3ee758c4b7d1f6a386ab7508a
BLAKE2b-256 cc6c808346ceed1472017362d7c2bf1534972527c2b63c2a117f0579ece99f86

See more details on using hashes here.

Provenance

The following attestation bundles were made for torbox-0.1.0a1.tar.gz:

Publisher: publish.yml on eliasbenb/TorBox.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file TorBox-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: TorBox-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for TorBox-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 842e873248289f64c274f70de937efee607b12cbd9b934b33a763900068d8f40
MD5 69dbf272d8a454682c35d2060f132e4b
BLAKE2b-256 8eaa2f0ff1bc52d50d55441d8e7835d751500765ebc12a70c2c2daa7035aade5

See more details on using hashes here.

Provenance

The following attestation bundles were made for TorBox-0.1.0a1-py3-none-any.whl:

Publisher: publish.yml on eliasbenb/TorBox.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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