Python SDK for the RelayFile virtual filesystem API
Project description
relayfile
Python SDK for the RelayFile virtual filesystem API.
Install
pip install relayfile-sdk
The import namespace remains relayfile.
Cloud Setup
The Python SDK exposes the portable Relayfile Cloud setup flow from the TypeScript SDK. Interactive browser login and native mount launching remain TypeScript/Node-only, but Python can create or join workspaces, connect or adopt integrations, set provider metadata, and build peer-agent invites.
from relayfile import RelayfileSetup
setup = RelayfileSetup(access_token="cld_access_token")
workspace = setup.create_workspace(name="docs-agent")
connect = workspace.connect_integration("github")
print(connect.connect_link)
workspace.wait_for_connection(
"github",
connection_id=connect.connection_id,
)
client = workspace.client()
tree = client.list_tree(workspace.workspace_id)
Workspace Primitives (M1)
The SDK exposes the workspace primitive paths and data shapes used by digest, layout, schema, and writeback tooling.
from relayfile import (
DIGEST_PATHS,
RelayFileClient,
is_digest_path,
provider_layout_path,
resource_schema_path,
)
client = RelayFileClient("https://api.relayfile.dev", token_provider)
# DIGEST_PATHS is the literal anchor-path taxonomy: the rolling daily
# files plus rolling and closing-window weekly files. Closed-window daily
# artifacts use the date-stamped form ``digests/YYYY-MM-DD.md``; filter
# events through ``is_digest_path`` to subscribe to the full taxonomy
# (anchor paths plus date-stamped form).
print(DIGEST_PATHS)
# (
# "digests/yesterday.md",
# "digests/today.md",
# "digests/this-week.md",
# "digests/last-week.md",
# )
assert is_digest_path("digests/today.md")
assert is_digest_path("digests/2026-05-12.md")
assert is_digest_path("digests/this-week.md")
assert is_digest_path("digests/last-week.md")
# Read canonical provider layout documentation.
layout = client.read_file(workspace_id, provider_layout_path("linear"))
# Read a writeback schema served beside a writeback resource.
schema = client.read_file(
workspace_id,
resource_schema_path("linear", "issues/AGE-16__abc/comments"),
)
# Writeback list mirrors `relayfile writeback list --state ...`. Rows come back
# as typed WritebackItem instances; dead-lettered rows carry an inline
# DeadLetterErrorPayload resolved from the .error.json sidecar.
#
# Naming note: the CLI flag uses `--state dead` (short form); the SDK and wire
# value is `"dead_lettered"` (the full WritebackState literal). The CLI
# translates `dead` -> `dead_lettered` before hitting the daemon.
pending = client.list_writebacks(workspace_id, state="pending")
# `list_pending_writebacks` is preserved as a thin alias for back-compat.
# Non-pending states (e.g. `"dead_lettered"`, `"succeeded"`, `"failed"`)
# currently raise NotImplementedError until the state-filtered endpoint
# (`GET /v1/workspaces/{ws}/writeback?state=...`) is added to the
# authoritative OpenAPI contract by the `update-relayfile-cli` slice
# (workspace-primitives work item 5). The typed return shape and the
# `DeadLetterErrorPayload` coercion are ready ahead of that landing.
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 relayfile_sdk-0.2.2.tar.gz.
File metadata
- Download URL: relayfile_sdk-0.2.2.tar.gz
- Upload date:
- Size: 51.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19f80ad2fb87f116c29e3ed87be5e551fe706790afaac1519037d62b65aed290
|
|
| MD5 |
30673ff7a503c09d75b200835a68f722
|
|
| BLAKE2b-256 |
252efdbc5e7a5aa1a3050b10126289f2ccc0287380e790ceac8d67cd9198c82d
|
Provenance
The following attestation bundles were made for relayfile_sdk-0.2.2.tar.gz:
Publisher:
publish-python.yml on AgentWorkforce/relayfile
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
relayfile_sdk-0.2.2.tar.gz -
Subject digest:
19f80ad2fb87f116c29e3ed87be5e551fe706790afaac1519037d62b65aed290 - Sigstore transparency entry: 1951747476
- Sigstore integration time:
-
Permalink:
AgentWorkforce/relayfile@c6fc94f0f252dab97be24ce4406b44f167198fb9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AgentWorkforce
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@c6fc94f0f252dab97be24ce4406b44f167198fb9 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file relayfile_sdk-0.2.2-py3-none-any.whl.
File metadata
- Download URL: relayfile_sdk-0.2.2-py3-none-any.whl
- Upload date:
- Size: 33.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b7b8c8da0c8df5432849e642f3597102325e24681177c5db8420ff1330d5028
|
|
| MD5 |
3017195bc30952c87e58c72afd591f84
|
|
| BLAKE2b-256 |
fc86c0cbdce9dcc7f5afdd7d625fe501ba0e294b6dcb49752858b5637d3e6892
|
Provenance
The following attestation bundles were made for relayfile_sdk-0.2.2-py3-none-any.whl:
Publisher:
publish-python.yml on AgentWorkforce/relayfile
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
relayfile_sdk-0.2.2-py3-none-any.whl -
Subject digest:
3b7b8c8da0c8df5432849e642f3597102325e24681177c5db8420ff1330d5028 - Sigstore transparency entry: 1951747695
- Sigstore integration time:
-
Permalink:
AgentWorkforce/relayfile@c6fc94f0f252dab97be24ce4406b44f167198fb9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AgentWorkforce
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@c6fc94f0f252dab97be24ce4406b44f167198fb9 -
Trigger Event:
workflow_dispatch
-
Statement type: