Skip to main content

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.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

relayfile_sdk-0.2.1.tar.gz (39.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

relayfile_sdk-0.2.1-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file relayfile_sdk-0.2.1.tar.gz.

File metadata

  • Download URL: relayfile_sdk-0.2.1.tar.gz
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for relayfile_sdk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 49ac3d64736b18472c6c70d65045be51c616c39339998227e9b672e44ab9b7ec
MD5 2eebf862121df93217a4ffd8a45aee8b
BLAKE2b-256 211502049c4c67844227fb7dbe413ee8be768525275b4c3f4990a20e666e0074

See more details on using hashes here.

Provenance

The following attestation bundles were made for relayfile_sdk-0.2.1.tar.gz:

Publisher: publish-python.yml on AgentWorkforce/relayfile

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file relayfile_sdk-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: relayfile_sdk-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for relayfile_sdk-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ebdf0b9b0c561f774dae5991f39b63769e8cbcb8631bec61a416f29849fe0e0
MD5 127a77916bf7143306ba9e2c432fc1b7
BLAKE2b-256 fddee175f6c838654a891416f62429c830205bff7664dc880f1b38d70bb675d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for relayfile_sdk-0.2.1-py3-none-any.whl:

Publisher: publish-python.yml on AgentWorkforce/relayfile

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page