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.
Metadata
Release files for relayfile-sdk 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| relayfile_sdk-0.2.2.tar.gz | 51.2 kB | With provenance | Details for relayfile_sdk-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| relayfile_sdk-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for relayfile_sdk-0.2.2-py3-none-any.whl |
Total release size: 84.8 kB
Release files / relayfile_sdk-0.2.2.tar.gz
| Download URL | relayfile_sdk-0.2.2.tar.gz |
|---|---|
| Size | 51.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19f80ad2fb87f116c29e3ed87be5e551fe706790afaac1519037d62b65aed290
|
|
BLAKE2b-256 checksum How to use checksums |
252efdbc5e7a5aa1a3050b10126289f2ccc0287380e790ceac8d67cd9198c82d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.
Transparency logRelease files / relayfile_sdk-0.2.2-py3-none-any.whl
| Download URL | relayfile_sdk-0.2.2-py3-none-any.whl |
|---|---|
| Size | 33.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b7b8c8da0c8df5432849e642f3597102325e24681177c5db8420ff1330d5028
|
|
BLAKE2b-256 checksum How to use checksums |
fc86c0cbdce9dcc7f5afdd7d625fe501ba0e294b6dcb49752858b5637d3e6892
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.
Transparency logSecurity for relayfile-sdk 0.2.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for relayfile_sdk-0.2.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.
Transparency logA 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.