Skip to main content

PirateBay.py

This project is intended to be an API wrapper for apibay & ThePirateBay (only the 'main.js' file for the trackers)

How does it works?

The functionality of this project is very easy to understand, as it's composed by a set of methods that point directly to the PirateBay API (apibay) with the sole purpose of parsing the response for the coder to then use it.

Installation

You can install this project by running the following commands:

pip install PirateBayAPI
# OR
pip install .

A very simple example that searchs "The Tomorrow War" in the Video.Movies category and prints results

import PirateBayAPI
import typing

# Static Typing isn't required (but recomended)
results: typing.List[PirateBayAPI.SearchElement] = PirateBayAPI.Search(
    "The Tomorrow War", PirateBayAPI.VideoType.Movies)

for result in results:
    print("File: {} {}.Mb (id:{})".format(
        result.name, round(result.size/1024/1024, 2), result.id))

Another example, in this case, we get the magnet link (necessary to download) of the first result of the search

import PirateBayAPI
import typing

# Static Typing isn't required (but recomended)
results: typing.List[PirateBayAPI.SearchElement] = PirateBayAPI.Search(
    "The Tomorrow War", PirateBayAPI.VideoType.Movies)

print("Download Link: {} (size:{}.Mb)".format(
    PirateBayAPI.Download(results[0].id), round(results[0].size/1024/1024, 2)))

Metadata

Release files for PirateBayAPI 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PirateBayAPI 1.0.1
File Size Uploaded
piratebayapi-1.0.1.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PirateBayAPI 1.0.1
File Interpreter ABI Platform
PirateBayAPI-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.6 kB

Release files / piratebayapi-1.0.1.tar.gz

Download URL piratebayapi-1.0.1.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ae85903e1697c8a05a91a4be050fe6e92b8dd7a950338fa31f067888934e0d79
BLAKE2b-256 checksum
How to use checksums
7d938c758e9f08feb3a1c44de2bd23278ca3d9c0701a55091e11677df9cb1bca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.7

Release files / PirateBayAPI-1.0.1-py3-none-any.whl

Download URL PirateBayAPI-1.0.1-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11f0d465a84ab9ad6722962466e7e83c3dd226797ca6ef9ce8ed94d03db8d27c
BLAKE2b-256 checksum
How to use checksums
7b5a76f30e478a327e5fd3dbe340e6cd74e75fe7decf22f3afe1735e601a972c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page