Lightweight Python client for the Qualis Desk Roku machine API (connect, validate users, clear transactions).
Project description
qualis-roku
Python 3.9+ helper for automating Roku Developer Portal workflows when your organization exposes a compatible Qualis Desk–style HTTP API (portal sign-in, test-user validation, clearing channel transactions from CI or tooling).
Install
pip install qualis-roku
From source (development):
pip install -e "./packages/qualis_roku"
Use cases
- Pre-flight checks — Confirm a QA email resolves to a portal test user for a given app (e.g. MAX / D+) before a test run.
- Clean slate — Void test-user purchases / entitlements on a channel before functional or billing-related tests.
- Pipelines — Drive the same flows from Jenkins, GitHub Actions, or internal runners without opening the browser UI.
- Batch operations — Loop over emails or products using the simple
(success, message)API.
Design
connect()— Start (or queue) server-side portal sign-in; no required arguments if your deployment defines default apps via configuration.validate(email, product)— Resolve the email in the current portal context for that product slug.clear_txn(email, product)— Clear transactions for that email and product.
Each returns (True, message) or (False, message) so callers can branch without exceptions for normal failures.
Lower-level methods (validate_users, clear_transactions, connect_and_wait, …) return full JSON envelopes when you need structured details.
Quick start
Credentials and host can come from environment variables (recommended—nothing secret in code) or be passed explicitly to the constructor. Your internal runbook names the exact variables; typical names look like a “Qualis base URL” and an “API credential” for your deployment.
From environment (set vars in the shell, CI secrets, or .env loaded by your app—do not commit secrets):
from qualis_roku import QualisRokuClient
# Uses deployment-specific env vars when base_url / api_token are omitted.
with QualisRokuClient() as client:
ok, msg = client.connect()
if not ok:
raise SystemExit(msg)
ok_v, msg_v = client.validate("qa.user@company.com", "max")
if not ok_v:
raise SystemExit(msg_v)
ok_c, msg_c = client.clear_txn("qa.user@company.com", "max")
if not ok_c:
raise SystemExit(msg_c)
Explicit arguments (useful for tests or when config is not on the process environment):
with QualisRokuClient(
base_url="https://your-qualis-host.example/qualis-desk",
api_token="your-credential",
) as client:
ok, msg = client.connect()
...
Omitted parameters fall back to environment; if both are missing, the client raises with a clear error. Passing base_url= or api_token= explicitly overrides the corresponding environment variable for that client instance.
Command line
After install, the qualis-roku executable (or python -m qualis_roku) exposes the same flows without writing Python:
qualis-roku --help
qualis-roku connect
qualis-roku validate qa.user@company.com max
qualis-roku clear qa.user@company.com max
qualis-roku run qa.user@company.com max
Pass --base-url and --api-token or configure the environment variables described in your internal runbook. connect can write a small session file (default ./.qualis_roku_session) so validate / clear can reuse the session; use --print-session-id-only for scripting.
Transient HTTP errors (429, 502–504) and retryable network failures are retried automatically with backoff.
Requirements
- Network: HTTPS access from the machine running the client to your Qualis deployment.
httpx(declared as a dependency).
Documentation
- Operators and integrators using Qualis Desk should follow internal documentation (runbooks, machine API samples) provided by your organization—not everything is duplicated here on PyPI.
Security (general)
- Prefer TLS end-to-end.
- Keep credentials out of source control and logs; use your platform’s secret management.
License
MIT.
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 qualis_roku-0.5.0.tar.gz.
File metadata
- Download URL: qualis_roku-0.5.0.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc2ddc9228da5d2c3e9b0741b4540be3c889d9bb4fab06fbbc547e6e047aa14a
|
|
| MD5 |
ed93af94a49d18f3c4a679b4b254cbae
|
|
| BLAKE2b-256 |
f8dbf81eac7b0c91438e748dad3bbf8c48d26417857fabe46a270d13901eac09
|
File details
Details for the file qualis_roku-0.5.0-py3-none-any.whl.
File metadata
- Download URL: qualis_roku-0.5.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e567706ea4e343bb4571812593aabf1419ceabc4583a21ddb6bb1401faff4e2a
|
|
| MD5 |
b8e8df68e438a852a74c6279dda133a0
|
|
| BLAKE2b-256 |
4196a29c1ea7a36b9152593d894c98f62392ca2862b996b72064dd23cb26064e
|