A Python SDK for interacting with the RooLink API
Project description
RooLink SDK
RooLink SDK is a Python library designed for seamless interaction with the RooLink API. It provides utilities for API request limits, parsing scripts, generating sensor data, and more.
Features
- Fetch API request limits
- Parse script data
- Generate sensor data for validation
- Create SBSD body
- Generate pixel data
- Solve sec-cpt challenges
Usage
Install the SDK via pip:
pip install roolink-sdk
Quick Start Here's how to use the SDK in your Python project:
Import the SDK and Initialize
from roolink_sdk.client import RooLink
from roolink_sdk.utils import get_bazadebezolkohpepadr, parse_script_url
# Initialize the RooLink SDK
api_key = "your_api_key"
protected_url = "https://example.com"
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
session = RooLink(api_key, protected_url, user_agent)
Fetch API Request Limit
limit = session.request_limit()
print("Request Limit:", limit)
Parse Script Data
script_body = "function example() { return 'sample'; }"
parsed_data = session.parse_script_data(script_body)
print("Parsed Data:", parsed_data)
Generate Sensor Data
abck = "sample_abck"
bm_sz = "sample_bm_sz"
sensor_data = session.generate_sensor_data(abck, bm_sz)
print("Sensor Data:", sensor_data)
Generate SBSD Body
url = "https://example.com/"
vid = "sample_vid"
cookie = "sample_cookie"
sbsd_body = session.generate_sbsd_body(url, vid, cookie)
print("SBSD Body:", sbsd_body)
Generate Pixel Data
bazadebezolkohpepadr = 12345
hash_value = "sample_hash"
pixel_data = session.generate_pixel_data(bazadebezolkohpepadr, hash_value)
print("Pixel Data:", pixel_data)
Solve sec-cpt Challenges
token = "sample_token"
timestamp = 1234567890
nonce = "sample_nonce"
difficulty = 3
cookie = "sample_cookie"
sec_cpt_answers = session.generate_sec_cpt_answers(token, timestamp, nonce, difficulty, cookie)
print("Sec-CPT Answers:", sec_cpt_answers)
License
This project is licensed under the MIT License. See the LICENSE file for details.
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 roolink_sdk-1.0.1.tar.gz.
File metadata
- Download URL: roolink_sdk-1.0.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19e6c8cfc1a760e36455c9ac157bde53bda6b59e92c0f7e3c936175500635a31
|
|
| MD5 |
9501ca1d54bc1b20c254cdc6e34690c8
|
|
| BLAKE2b-256 |
fbff250af5fd74876f2bcb5492c118c2345b0fe69a3f6001ac9953b71c6bf9f0
|
File details
Details for the file roolink_sdk-1.0.1-py3-none-any.whl.
File metadata
- Download URL: roolink_sdk-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
727fb6d17b9d5ee6efd69458fe7cf5d3dc8b37d72f9333843784ccb6ff84ac11
|
|
| MD5 |
ae38d4f1cd8ed5bbaae94d30377ece85
|
|
| BLAKE2b-256 |
b82d61bb3dac4b64c866a4efb78ea4c86a2a914bf029b517b0567561f82e4b04
|