Skip to main content

retoolrpc Python client package

Review Retool's RPC documentation before installing the JavaScript package.

Installation

Use pip or poetry to install the packages.

# Using pip
pip install retoolrpc asyncio

# Using poetry
poetry init
poetry add retoolrpc asyncio

Usage example

import asyncio
from retoolrpc import RetoolRPC, RetoolRPCConfig

async def start_rpc():
  rpc_config = RetoolRPCConfig(
      api_token="your-api-token-here", # Replace this token with your API token
      host="http://localhost:3000/", # Replace this host with your host domain
      resource_id="resource-id", # Replace this resource ID with your ID
      environment_name="production", # Replace this environment name with your name (defaults to production)
      polling_interval_ms=1000, # The polling interval for the RPC
      version="0.0.1", # An optional version number for functions schemas
      log_level="info", # Change to 'debug' for verbose logging
  )

  rpc = RetoolRPC(rpc_config)

  def helloWorld(args, context):
      return f"Hello {args['name']}!"

  rpc.register(
      {
          "name": "helloWorld",
          "arguments": {
              "name": {
                  "type": "string",
                  "description": "Your name",
                  "required": True,
                  "array": False,
              },
          },
          "implementation": helloWorld,
          "permissions": None,
      }
  )

  await rpc.listen()

if __name__ == "__main__":
  asyncio.run(start_rpc())

Metadata

Release files for retoolrpc 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for retoolrpc 0.1.2
File Size Uploaded Provenance Actions
retoolrpc-0.1.2.tar.gz 9.7 kB Without provenance Details for retoolrpc-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for retoolrpc 0.1.2
File Interpreter ABI Platform Actions
retoolrpc-0.1.2-py3-none-any.whl Python 3 none any Details for retoolrpc-0.1.2-py3-none-any.whl

Total release size: 21.6 kB

Release files / retoolrpc-0.1.2.tar.gz

Download URL retoolrpc-0.1.2.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
52379a1b653fe5f0c8830dae823d898c4a637ea8111921635fea493153bbfbbd
BLAKE2b-256 checksum
How to use checksums
0ec89914aec479826386abc0325ea468bdefb7fd55c31278bfafe96acc8805e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.13 Darwin/21.6.0

Release files / retoolrpc-0.1.2-py3-none-any.whl

Download URL retoolrpc-0.1.2-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c49506f2292e8513ee7b9525d46f120b1464eeee8cb0bc38ccc0fc7bc009407
BLAKE2b-256 checksum
How to use checksums
bec8509438a6fe8d900b03d2441edfff7c5e0488f9c42b7624be42b99a17ed82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.13 Darwin/21.6.0

Security for retoolrpc 0.1.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page