SDK for building third-party automations for the ToRivers marketplace
Project description
ToRivers SDK
Build and publish automations for the ToRivers marketplace.
Installation
pip install torivers-sdk
Quick Start
Create a new automation:
from torivers_sdk import Automation, AutomationMetadata, BaseState
from langgraph.graph import StateGraph
from typing import Annotated, Any
class MyState(BaseState):
"""State for my automation."""
result: Annotated[str, lambda l, r: r]
class MyAutomation(Automation[MyState]):
"""A simple automation example."""
def metadata(self) -> AutomationMetadata:
return AutomationMetadata(
name="my-automation",
title="My Automation",
version="1.0.0",
description="Does something useful",
category="general",
)
def get_state_class(self) -> type[MyState]:
return MyState
def build_graph(self) -> StateGraph:
graph = StateGraph(MyState)
graph.add_node("process", self.process)
graph.set_entry_point("process")
graph.set_finish_point("process")
return graph
def process(self, state: MyState) -> dict[str, Any]:
context = state["context"]
context.log_progress("Processing", "Starting work...")
# Your automation logic here
result = f"Processed: {state['input_data']}"
context.log_success("Done", "Work completed!")
return {"output_data": {"result": result}}
Testing Locally
Use the local sandbox to test your automation:
import asyncio
from torivers_sdk.testing import LocalSandbox, MockCredentialProxy
async def test_automation():
sandbox = LocalSandbox()
# Set up mock credentials if needed
credentials = MockCredentialProxy(["gmail", "sheets"])
sandbox.set_credentials(credentials)
# Run the automation
automation = MyAutomation()
result = await sandbox.run(automation, {"query": "test"})
assert result.success
print(f"Output: {result.output_data}")
asyncio.run(test_automation())
CLI Commands
# Initialize a new automation project
torivers init my-automation
# Run locally
torivers run --input input.json
# Run tests
torivers test
# Validate before submission
torivers validate
# Submit for review
torivers submit
# Authenticate and track review
torivers login
torivers status
Documentation
For full documentation, visit docs.torivers.com/sdk
Versioning & Releases
This package uses bump-my-version for version management. Install dev dependencies first:
pip install -e ".[dev]"
Bump the version (creates a commit + sdk-v* tag automatically):
bump-my-version bump patch # 0.1.0 → 0.1.1
bump-my-version bump minor # 0.1.0 → 0.2.0
bump-my-version bump --new-version 0.2.0b1 # Start a beta cycle
bump-my-version bump pre_n # Next beta (b1 → b2)
bump-my-version bump pre_l # Beta → RC → Stable
Then push to trigger the PyPI publish workflow:
git push && git push --tags
Pre-releases (b/rc tags) are published to PyPI but not installed by default — users must pip install --pre torivers-sdk.
Requirements
- Python 3.11+
- Dependencies: langgraph, pydantic, httpx, click, rich, docker, pyyaml
License
Proprietary - see LICENSE for details.
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 torivers_sdk-0.1.0b4.tar.gz.
File metadata
- Download URL: torivers_sdk-0.1.0b4.tar.gz
- Upload date:
- Size: 151.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ddc84e5fd033f37aedfe54bc3185fd63cd4c140f02cb6265fb09bf96f089490
|
|
| MD5 |
fb7c038323f2bea807d5a1dc29405264
|
|
| BLAKE2b-256 |
38da2a8d37e7fdfed8ba18cee39971e21049e84a546cb0c84d5aa4df1daec8eb
|
Provenance
The following attestation bundles were made for torivers_sdk-0.1.0b4.tar.gz:
Publisher:
sdk-publish.yml on Lo-Agency/torivers-v2
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torivers_sdk-0.1.0b4.tar.gz -
Subject digest:
7ddc84e5fd033f37aedfe54bc3185fd63cd4c140f02cb6265fb09bf96f089490 - Sigstore transparency entry: 999556821
- Sigstore integration time:
-
Permalink:
Lo-Agency/torivers-v2@fdccf4f4498466ed759e9a9e53f9a9fbda3a2eda -
Branch / Tag:
refs/tags/sdk-v0.1.0b4 - Owner: https://github.com/Lo-Agency
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-publish.yml@fdccf4f4498466ed759e9a9e53f9a9fbda3a2eda -
Trigger Event:
push
-
Statement type:
File details
Details for the file torivers_sdk-0.1.0b4-py3-none-any.whl.
File metadata
- Download URL: torivers_sdk-0.1.0b4-py3-none-any.whl
- Upload date:
- Size: 144.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6220059548b04fcd0f531b0f39a3d04373b566290ed91e53e7500cf4659c31b8
|
|
| MD5 |
f8b93389850b9b4f8e6f6b2f3a4ece5d
|
|
| BLAKE2b-256 |
f0b76b3a8446d3eb9080bee1ea6eb4ad3614cdbcd1d7084b1bc9923416cbc858
|
Provenance
The following attestation bundles were made for torivers_sdk-0.1.0b4-py3-none-any.whl:
Publisher:
sdk-publish.yml on Lo-Agency/torivers-v2
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torivers_sdk-0.1.0b4-py3-none-any.whl -
Subject digest:
6220059548b04fcd0f531b0f39a3d04373b566290ed91e53e7500cf4659c31b8 - Sigstore transparency entry: 999556948
- Sigstore integration time:
-
Permalink:
Lo-Agency/torivers-v2@fdccf4f4498466ed759e9a9e53f9a9fbda3a2eda -
Branch / Tag:
refs/tags/sdk-v0.1.0b4 - Owner: https://github.com/Lo-Agency
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-publish.yml@fdccf4f4498466ed759e9a9e53f9a9fbda3a2eda -
Trigger Event:
push
-
Statement type: