Skip to main content

Python RevrseAI client library

Project description

RevrseAI Python Library

pypi

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:

  1. Go to https://revrse.ai
  2. Login or sign up for an account
  3. Navigate to the Settings page
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

revrseai_python-0.1.1.tar.gz (39.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

revrseai_python-0.1.1-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

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

Hashes for revrseai_python-0.1.1.tar.gz
Algorithm Hash digest
SHA256 36c0253d58f43357c693fb3dc37cf14549cb9dc39c7cfb42a795b2c6389ce43b
MD5 69d126a0c7fe3fec03c5f57b765d6bbb
BLAKE2b-256 9417129ae7c7c01268180ad509b816d6ef17518d1832997c6437915ed490dcf3

See more details on using hashes here.

File details

Details for the file revrseai_python-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for revrseai_python-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1f223dd5adb116fd53e02cba112e653bbdf4671a715b2a4e7a849bdb2778f3be
MD5 4b6cecc7bccf5a2f897bb630c1f8a572
BLAKE2b-256 e40ba00d17be8bfa093e6201cef46bb5c180174ad5dcab7065433ed55a568c1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page