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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
532a501fadd013325d1470be182fc448b1fb16d74030498a20cf12fe650c4d5b
|
|
| MD5 |
abebf3d3ee758c4b7d1f6a386ab7508a
|
|
| BLAKE2b-256 |
cc6c808346ceed1472017362d7c2bf1534972527c2b63c2a117f0579ece99f86
|
Provenance
The following attestation bundles were made for torbox-0.1.0a1.tar.gz:
Publisher:
publish.yml on eliasbenb/TorBox.py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torbox-0.1.0a1.tar.gz -
Subject digest:
532a501fadd013325d1470be182fc448b1fb16d74030498a20cf12fe650c4d5b - Sigstore transparency entry: 150944184
- Sigstore integration time:
-
Permalink:
eliasbenb/TorBox.py@15238c46a68560c516ce05cb853302e0acc3ba73 -
Branch / Tag:
refs/tags/v0.1.0-alpha.1 - Owner: https://github.com/eliasbenb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@15238c46a68560c516ce05cb853302e0acc3ba73 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
842e873248289f64c274f70de937efee607b12cbd9b934b33a763900068d8f40
|
|
| MD5 |
69dbf272d8a454682c35d2060f132e4b
|
|
| BLAKE2b-256 |
8eaa2f0ff1bc52d50d55441d8e7835d751500765ebc12a70c2c2daa7035aade5
|
Provenance
The following attestation bundles were made for TorBox-0.1.0a1-py3-none-any.whl:
Publisher:
publish.yml on eliasbenb/TorBox.py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torbox-0.1.0a1-py3-none-any.whl -
Subject digest:
842e873248289f64c274f70de937efee607b12cbd9b934b33a763900068d8f40 - Sigstore transparency entry: 150944185
- Sigstore integration time:
-
Permalink:
eliasbenb/TorBox.py@15238c46a68560c516ce05cb853302e0acc3ba73 -
Branch / Tag:
refs/tags/v0.1.0-alpha.1 - Owner: https://github.com/eliasbenb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@15238c46a68560c516ce05cb853302e0acc3ba73 -
Trigger Event:
release
-
Statement type: