Rayon Python SDK
Generate Shape headers or form telemetry and read account usage. Keep your API key server-side. Your integration owns its HTTP client or browser and target session.
Quickstart · SDK guide · All SDKs
Install
python -m pip install 'rayon-sdk-py>=1.1.4,<2'
Check usage, then generate
Set RAYON_API_KEY. Prepare shape.json using the
input guide: source-page URL, complete ordered
script sources, a profile object and the exact target request. Include browser
measurements or JavaScript-visible cookies only when your flow requires them.
import json
import os
from pathlib import Path
from rayon_sdk_py import Client
with Client(os.environ["RAYON_API_KEY"]) as client:
usage = client.usage() # Free; no generation quota used.
print(usage)
shape = json.loads(Path("shape.json").read_text(encoding="utf-8"))
result = client.generate(shape)
# Apply result.headers using your existing target client/session.
# Reuse client here for further requests with their current inputs.
print(result.request_id)
Apply the entire returned header map unchanged, including optional a0, to that
exact request. Keep required application headers, authentication and session state
in your target client. RayonAPI does not download scripts, send the target request
or return target cookies. Inspect the target response to establish acceptance.
Form telemetry
For observed URL-encoded form telemetry, use mode: "form" and supply the exact
application body before telemetry insertion. The result has form_fields and
form_body, without generated headers. Prepend form_body once to the original
body, preserving its bytes, duplicate fields and encoding. See
Form payload integration
for complete examples.
Client options and errors
Requires Python 3.10+. Use AsyncClient with async with,
await client.usage() and await client.generate(shape) in async applications.
Set timeout=45 in the constructor to set the API timeout.
Errors inherit RayonError: ValidationError, TransportError, HTTPError
and InvalidResponseError. Available metadata includes status_code,
request_id, code, retry_after, reason, action, domain, field,
billing_status and retryable.
The default API URL is https://api.rayonapi.com; default timeout is 45 seconds.
Keep one client open across calls. Python and JavaScript SDK 1.1.4 reuse material
in both modes while generating fresh telemetry for each request. Read the
material and recovery policy
for cache scope, limits and the single confirmed uncharged material recovery.
Check request history before resubmitting after a timeout or uncertain billing outcome. See errors and retry guidance, request fields and browser/session inputs. The Python download helper is optional.
Metadata
Release files for rayon-sdk-py 1.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| rayon_sdk_py-1.1.5.tar.gz | 33.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rayon_sdk_py-1.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 52.4 kB
Release files / rayon_sdk_py-1.1.5.tar.gz
| Download URL | rayon_sdk_py-1.1.5.tar.gz |
|---|---|
| Size | 33.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17f1dd611516d7526604421b34e9b7032b9484f9cc2159944879ba6b0cedaa6e
|
|
BLAKE2b-256 checksum How to use checksums |
a2ff3e3ec5d3267ef1f1ff66f8b7b574ab2c729eb2041e4e49864bea89fd694a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logRelease files / rayon_sdk_py-1.1.5-py3-none-any.whl
| Download URL | rayon_sdk_py-1.1.5-py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a2649901878e0f45990dae71dcbc0dceab0a44b4b9eb32926f591039753ca3c
|
|
BLAKE2b-256 checksum How to use checksums |
916e68de98b41ef8285eeee277e8b82da49d262f819e81b287f24ab5bc3b5527
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logSecurity for rayon-sdk-py 1.1.5
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for rayon_sdk_py-1.1.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logA 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.