Quickstart
Install Rebase Toolkit, run a Rebase Function, and run a step-based Rebase Workflow.
Rebase Toolkit lets you define Python functions and Rebase Workflows locally, run them on your machine, and submit ephemeral cloud runs from the terminal.
This quickstart creates two minimal examples:
| Example | What it shows | Default run type |
|---|---|---|
| Rebase Function | One SDK-callable Python function. | quick |
| Rebase Workflow | One SDK-callable workflow with multiple observable steps. | quick |
1. Install
During early development, install Rebase Toolkit directly from GitHub into a clean uv environment:
uv venv .venv
source .venv/bin/activate
uv pip install "rebase-toolkit @ git+ssh://git@github.com/rebase-energy/rebase-toolkit.git"Once the package is published to PyPI, install from PyPI:
pip install rebase-toolkit2. Set Up
Authenticate this computer and select or create a workspace:
rebase setupThe setup wizard signs you in with Google or GitHub, creates or selects a workspace, and stores a local auth session and workspace profile. The hosted Rebase API URL is built into rebase-toolkit, so there is no API URL to configure for normal usage.
GitHub source backing is optional. If you connect GitHub, the wizard first asks whether to use an existing repository or create a new one, then asks you to install the Rebase GitHub App on the selected repository.
3. Run a Function
Create hello_function.py:
import rebase
@rebase.function(name="hello-function")
def hello(name: str = "World") -> dict:
return {"message": f"Hello, {name}!"}
if __name__ == "__main__":
print(hello(name="Rebase"))Run it locally:
python hello_function.pyExpected output:
{"message": "Hello, Rebase!"}Run the same file in the cloud without deploying it:
rebase run hello_function.py --param name=RebaseFunctions are private Python callables. By default, Rebase uses run_type="quick", which runs each call synchronously on an isolated Cloud Run service that stays warm after the first call. Use run_type="long" for long-running jobs. Introduce deploys later, when you want a reusable, versioned function target.
4. Run a Workflow
Create hello_workflow.py:
import rebase
@rebase.step()
def load_name(name: str = "World") -> dict:
return {"name": name}
@rebase.step()
def build_message(payload: dict) -> str:
return f"Hello, {payload['name']}!"
@rebase.step()
def package_result(message: str) -> dict:
return {"message": message}
@rebase.workflow(name="hello-workflow")
def hello_workflow(name: str = "World") -> dict:
payload = load_name(name)
message = build_message(payload)
return package_result(message)
if __name__ == "__main__":
print(hello_workflow(name="Rebase"))Run it locally:
python hello_workflow.pyExpected output:
{"message": "Hello, Rebase!"}Run the same workflow in the cloud without deploying it:
rebase run hello_workflow.py --param name=RebaseWorkflows are Python entrypoints that Rebase can submit through Prefect orchestration. Step calls inside a workflow are compiled into a Prefect-backed DAG for cloud runs, giving you multiple observable steps, retries, and per-step status. Introduce deploys later, when you want a reusable, versioned workflow target or a scheduled workflow.
5. Next
| Page | Use it for |
|---|---|
| Run Types | Compare the quick, quick_shared, and long run types. |
| Function Run Types | Configure function execution, dependencies, and Cloud Run isolation. |
| Workflow Run Types | Choose between warm-service and Cloud Run Jobs workflow execution. |
| Endpoints | Expose deployed functions, models, and workflows as HTTP routes. |
| Reference | Look up SDK and CLI signatures. |

