Official Python SDK for the Reversal Engine API
Project description
Reversal SDK — Python
Client Python officiel pour l'API Reversal Engine.
Installation
pip install reversal-sdk
Ou depuis les sources :
pip install ./sdk/python
Démarrage rapide
from reversal_sdk import ReversalClient
client = ReversalClient(api_key="sk-rev-...")
# Analyser une URL
result = client.reverse("https://example.com")
print(result["content_type"], result["content"])
# Analyser un fichier local (upload automatique)
result = client.reverse("rapport.pdf")
# Mode asynchrone — soumettre un job
job = client.submit_job("gros-fichier.pdf")
# … attendre le résultat en polling
result = client.wait_for_job(job["job_id"])
# Ou streamer les événements en temps réel
for event in client.stream_job(job["job_id"]):
print(event["event"], event["data"])
# Uploader un fichier manuellement
info = client.upload("document.pdf")
result = client.reverse(f"file:{info['file_id']}")
# Batch (jusqu'à 10 sources)
results = client.batch(["https://a.com", "https://b.com"])
# Infos compte
me = client.me()
print(me["plan"], me["usage"], "/", me["quota"])
Référence API
| Méthode | Description |
|---|---|
reverse(source, *, async_mode, extra) |
Parse une source, retourne le résultat structuré |
submit_job(source) |
Équivalent à reverse(..., async_mode=True) |
wait_for_job(job_id, *, poll_interval, timeout) |
Polling jusqu'à done ou failed |
get_job(job_id) |
Récupère l'état courant d'un job |
stream_job(job_id) |
Générateur d'événements SSE |
upload(path) |
Upload un fichier local |
batch(sources, *, async_mode) |
Parse plusieurs sources en une requête |
detect(source) |
Détecte le type sans parser |
delete_file(file_id) |
Supprime un fichier uploadé |
me() |
Infos compte (plan, usage, quota) |
Exceptions
from reversal_sdk import (
ReversalError, # base
AuthError, # 401 / 403
NotFoundError, # 404
RateLimitError, # 429
QuotaError, # 402
ServerError, # 5xx
)
Variables d'environnement
| Variable | Description |
|---|---|
REVERSAL_API_KEY |
Clé API (alternative à api_key=) |
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
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 reversal_sdk-1.1.1.tar.gz.
File metadata
- Download URL: reversal_sdk-1.1.1.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab0fe5cf730e97a7a70e8727ff68deadf24ce44fa7c56908272cd1a5b0a675ca
|
|
| MD5 |
7555246dfaa47468e9a99361e13b756e
|
|
| BLAKE2b-256 |
2a35221252cd69303a521ea63ba4fa96a3b7bddce854b4dd7a2fc622f62e3354
|
Provenance
The following attestation bundles were made for reversal_sdk-1.1.1.tar.gz:
Publisher:
publish.yml on Etytabs/REVERSAL
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reversal_sdk-1.1.1.tar.gz -
Subject digest:
ab0fe5cf730e97a7a70e8727ff68deadf24ce44fa7c56908272cd1a5b0a675ca - Sigstore transparency entry: 1702669532
- Sigstore integration time:
-
Permalink:
Etytabs/REVERSAL@3ed9fc8c9aa3bb4b623224bab17e0433d7bb5f3c -
Branch / Tag:
refs/tags/v1.1.1 - Owner: https://github.com/Etytabs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3ed9fc8c9aa3bb4b623224bab17e0433d7bb5f3c -
Trigger Event:
push
-
Statement type:
File details
Details for the file reversal_sdk-1.1.1-py3-none-any.whl.
File metadata
- Download URL: reversal_sdk-1.1.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe3aeb0eb2503a96b04ea2a6bfcf41d6febfcf5f280ad0e202f7a7f2ba4d2115
|
|
| MD5 |
2d9a946f0af35d424b15288f177cc24e
|
|
| BLAKE2b-256 |
f14d7324a112d36b4720878c291457fcbc0176cefeb786e0e8c79e155a7aa2b8
|
Provenance
The following attestation bundles were made for reversal_sdk-1.1.1-py3-none-any.whl:
Publisher:
publish.yml on Etytabs/REVERSAL
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reversal_sdk-1.1.1-py3-none-any.whl -
Subject digest:
fe3aeb0eb2503a96b04ea2a6bfcf41d6febfcf5f280ad0e202f7a7f2ba4d2115 - Sigstore transparency entry: 1702669549
- Sigstore integration time:
-
Permalink:
Etytabs/REVERSAL@3ed9fc8c9aa3bb4b623224bab17e0433d7bb5f3c -
Branch / Tag:
refs/tags/v1.1.1 - Owner: https://github.com/Etytabs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3ed9fc8c9aa3bb4b623224bab17e0433d7bb5f3c -
Trigger Event:
push
-
Statement type: