Skip to main content

A simple and easy-to-use Python wrapper for Real-Debrid API (https://api.real-debrid.com)

Project description

RD Wrapper

GitHub Actions Workflow Status PyPI - Version PyPI - Python Version

A simple and easy-to-use Python wrapper for Real-Debrid API.

Installation (from PyPI)

python -m pip install rd-wrapper

Example Usage

from rd_wrapper import RDW


# Initialize the wrapper with your API token or username and password
rdw = RDW(api_token='YOUR_API_TOKEN', username='YOUR_USERNAME', password='YOUR_PASSWORD',  anonymous_access=False)

# Extracting current API token from the account
print(f'Current API Token (str): {rdw.get_current_api_token(rdw.auth_token)}')

# Generating new API token
print(f'New API Token (str): {rdw.generate_new_api_token(rdw.auth_token)}')

# Extracting account information
print(f'Is Anonymous Access? (bool): {rdw.is_anonymous_access}')
print(f'Account E-Mail (str): {rdw.account_email}')
print(f'Is Account Premium? (bool): {rdw.is_premium_account}')
print(f'Account Type (str): {rdw.account_type}')
print(f'Account Plan Expiration Timestamp (int): {rdw.premium_plan_expiration_timestamp}')
print(f'Account Fidelity Points (int): {rdw.account_fidelity_points}')
print(f'Account ID (int): {rdw.account_id}')
print(f'Account Username (str): {rdw.account_username}')
print(f'Account Avatar URL (str): {rdw.account_avatar_url}')
print(f'Account Language Code (str): {rdw.account_language_code}')

# Retrieve server time and server iso time
print(f'Server Time (str|int): {rdw.get_server_time(unix_timestamp=False)}')
print(f'Server ISO Time (str|int): {rdw.get_server_iso_time(unix_timestamp=True)}')

# Check if the url is supported
print(f'Is URL Supported? (bool): {rdw.is_supported_url(url='http(s)://...', password=None)}')

# Unrestricting a single URL (returns a dict with the download url and other info)
print(f'Unlimited URL Data (dict): {rdw.get_unlimited_url_data(url='http(s)://...', password=None, remote_traffic=False)}')

# Unrestricting a folder URL (returns a list of download URLs)
print(f'Original/Unlimited Folder URLs (list): {rdw.get_unlimited_folder_url_list(url='http(s)://...', unrestrict_urls=True)}')

# --> Other methods are available to use, check the source code and the documentation for more information

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

rd_wrapper-0.0.8.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

rd_wrapper-0.0.8-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file rd_wrapper-0.0.8.tar.gz.

File metadata

  • Download URL: rd_wrapper-0.0.8.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for rd_wrapper-0.0.8.tar.gz
Algorithm Hash digest
SHA256 5480472648164a4230615be8166c1c3621e7529126e7e7d69dd08609fc3cfba9
MD5 ee5f7d111f558662b9d071521dc9f3bf
BLAKE2b-256 ccf25405675cdfffa21d2c88e5e4d1c9fd301239b3c7959b39930b285e36c4c1

See more details on using hashes here.

File details

Details for the file rd_wrapper-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: rd_wrapper-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for rd_wrapper-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 5cf1ae251c9d4e5a93a7902250d9a621caa784dc6d815210c328847908408c71
MD5 7c9040c7c683df0c6ea693cdfc7be25f
BLAKE2b-256 a41c9b98d7e30426652aeffe2efa5ef5af31f6ccebd25e054548de6f87351a34

See more details on using hashes here.

Supported by

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