Skip to main content

Yuumi

Yuumi is a Python package that allows you to use multiple debrid services in your Python projects.

Installation

poetry add Yuumi

or

pip install Yuumi

Usage

from Yuumi.debrid import RealDebridAPI

api = RealDebridAPI("your_access_token")

# Get user info
user_info = await api.get_user_info()
print(user_info)

# Check instant availability
instant_availability = await api.get_instant_availability("2f5a5ccb7dc32b7f7d7b150dd6efbce87d2fc371")
print(instant_availability)

# Download a file
download = await api.add_magnet("magnet:?xt=urn:btih:2f5a5ccb7dc32b7f7d7b150dd6efbce87d2fc371")
print(download)

Download Example

import asyncio
from yuumi.debrid import RealDebridAPI

async def main():
    api = RealDebridAPI("your_access_token")

    # Example: Downloading a cached torrent
    torrent_hash = "your_torrent_hash"
    availability = await api.get_instant_availability(torrent_hash)
    if availability:
        magnet_link = "your_magnet_link"
        torrent_info = await api.add_magnet(magnet_link)
        torrent_id = torrent_info["id"]
        await api.select_torrent_files(torrent_id, "all")
        print("Files selected and ready for download.")
    else:
        print("Torrent is not cached.")

    # Example: Downloading a non-cached torrent
    magnet_link = "your_magnet_link"
    torrent_info = await api.add_magnet(magnet_link)
    torrent_id = torrent_info["id"]
    print("Torrent added. Waiting for it to be cached...")

    # Timeout mechanism: Give up after 5 minutes (300 seconds)
    timeout = 300
    start_time = asyncio.get_event_loop().time()

    while True:
        torrent_status = await api.get_torrent_info(torrent_id)
        if torrent_status["status"] == "downloaded":
            await api.select_torrent_files(torrent_id, "all")
            print("Files selected and ready for download.")
            break
        if asyncio.get_event_loop().time() - start_time > timeout:
            print("Timeout reached. Torrent is not cached. Giving up.")
            break
        await asyncio.sleep(30)  # Wait for 30 seconds before checking again

# Run the main function
asyncio.run(main())

CLI Usage

yuumi --token YOUR_ACCESS_TOKEN --user

More information can be found here:

yuumi --help

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Metadata

Release files for yuumi 0.3.2

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

Source distribution (sdist)

Source distribution for yuumi 0.3.2
File Size Uploaded Provenance Actions
yuumi-0.3.2.tar.gz 5.5 kB Without provenance Details for yuumi-0.3.2.tar.gz

Built distribution (wheel)

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

Total release size: 12.3 kB

Release files / yuumi-0.3.2.tar.gz

Download URL yuumi-0.3.2.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e9a94996d46190f7670ac206f464b30f41ca3d34d198305371a4d538e668328d
BLAKE2b-256 checksum
How to use checksums
deeff065db719f2f5cc49890754b8a03a6d51e311fd0a6a37063fe0482849921
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.2 Linux/5.15.153.1-microsoft-standard-WSL2

Release files / yuumi-0.3.2-py3-none-any.whl

Download URL yuumi-0.3.2-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c0aef15e8c65445295b06d16b1ab13613ddcd563ca6bfc0e0147fca755098e7
BLAKE2b-256 checksum
How to use checksums
2e64eb604a302443ef2ff71c6381202f98e52f36f90121b5b8fe8a554ad6df0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.2 Linux/5.15.153.1-microsoft-standard-WSL2

Security for yuumi 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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