Python RevrseAI client library
Project description
RevrseAI Python Library
A Python client library for interacting with the RevrseAI API. Generate APIs for any Android app using a single prompt — extract data, automate tasks, and build integrations without an emulator. Generated endpoints are deterministic and don't rely on an LLM or emulator at execution time, making them extremely fast, cheap, and stable.
Getting an API Key
To use this library, you'll need an API key:
- Go to https://revrse.ai
- Login or sign up for an account
- Navigate to the Settings page
- Generate your API key
Installation
pip install revrseai-python
Requirements
- Python 3.11+
Usage
The library needs to be configured with your account's API key which is
available in your RevrseAI settings page. Set it directly or use the REVRSE_AI_API_KEY
environment variable:
from revrseai import RevrseAI
client = RevrseAI("your_api_key")
Generate an API
Generate an API for any Android app by describing what you want to do:
from revrseai import RevrseAI
client = RevrseAI("your_api_key")
task = client.generate(
"Log into Job Today and get the jobs on my feed",
secrets={
"username": "your_username",
"password": "your_password"
}
)
# Wait for generation to complete
result = task.wait_till_done()
# Print the generated API documentation
result.print_markdown_documentation()
Execute an Endpoint
Execute endpoints using one of three methods:
By endpoint ID:
result = client.execute(
endpoint_id="<endpoint_id>",
data={"username": "your_username", "password": "your_password"}
)
print(result.status)
print(result.data)
By task ID and endpoint name:
result = client.execute(
task_id="<task_id>",
endpoint="login",
data={"username": "your_username", "password": "your_password"}
)
By app name and endpoint:
result = client.execute(
app="Job Today",
endpoint="login",
data={"username": "your_username", "password": "your_password"}
)
Get App Info
Retrieve information about existing endpoints for an app:
info = client.info("Job Today")
# Print available endpoints
info.print_markdown_documentation()
# Execute an endpoint directly
endpoint = info.endpoints[0]
result = endpoint.execute(data={"key": "value"})
Export Documentation
Export generated API documentation to a file:
task = client.generate("Natural language instructions to perform the task")
result = task.wait_till_done()
# Export to markdown file
result.export_markdown_documentation("api_docs.md")
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 revrseai_python-0.1.1.tar.gz.
File metadata
- Download URL: revrseai_python-0.1.1.tar.gz
- Upload date:
- Size: 39.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36c0253d58f43357c693fb3dc37cf14549cb9dc39c7cfb42a795b2c6389ce43b
|
|
| MD5 |
69d126a0c7fe3fec03c5f57b765d6bbb
|
|
| BLAKE2b-256 |
9417129ae7c7c01268180ad509b816d6ef17518d1832997c6437915ed490dcf3
|
File details
Details for the file revrseai_python-0.1.1-py3-none-any.whl.
File metadata
- Download URL: revrseai_python-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f223dd5adb116fd53e02cba112e653bbdf4671a715b2a4e7a849bdb2778f3be
|
|
| MD5 |
4b6cecc7bccf5a2f897bb630c1f8a572
|
|
| BLAKE2b-256 |
e40ba00d17be8bfa093e6201cef46bb5c180174ad5dcab7065433ed55a568c1b
|