Skip to main content

SteadyLink Python SDK

CI PyPI Python License: MIT

The official Python client for the SteadyLink API.

Requirements

  • Python 3.10 or newer
  • A SteadyLink workspace and API key

The package has no runtime dependencies. Management API keys must only be used in trusted server environments.

Installation

python -m pip install steadylink

Quick start

import os
from steadylink import SteadyLink

client = SteadyLink(
    api_key=os.environ["STEADYLINK_API_KEY"],
    workspace_id=os.environ.get("STEADYLINK_WORKSPACE_ID"),
)

buckets = client.list_buckets()["items"]

Create a scoped API key in Dashboard > Developers. You can use access_token instead of api_key for a signed-in user session. Pass exactly one authentication method.

Upload a file

from pathlib import Path

path = Path("campaign-hero.webp")
data = path.read_bytes()

asset = client.upload_file(
    "bucket_id",
    filename=path.name,
    body=data,
    content_type="image/webp",
    path="campaign/",
)

upload_file creates an upload session, sends the bytes to the presigned storage URL, and finalizes the upload. SteadyLink credentials are never attached to the storage request.

Replace a file

client.replace_file(
    "bucket_id",
    "campaign/campaign-hero.webp",
    filename=path.name,
    body=data,
    content_type="image/webp",
)

The replacement creates a new revision. Existing delivery URLs continue to work.

Configuration

client = SteadyLink(
    api_key=os.environ["STEADYLINK_API_KEY"],
    workspace_id="workspace_id",
    base_url="https://api.steadylink.io",
    max_retries=2,
)
Option Description
api_key Server-side management API key.
access_token User access token. Use this or api_key, not both.
workspace_id Workspace used for workspace-scoped operations.
base_url API origin. Useful for private or preview environments.
max_retries Maximum transient retries. Defaults to 2.
transport Custom JSON transport for testing or alternate runtimes.
binary_transport Custom presigned-upload transport.

Errors and retries

from steadylink import SteadyLinkError, SteadyLinkNetworkError

try:
    client.list_buckets()
except SteadyLinkError as error:
    print(error.status, error.code, error.request_id, error.detail)
except SteadyLinkNetworkError as error:
    print(str(error))

The client retries 429, 502, 503, and 504 responses for safe HTTP methods. A mutating request is only retried when it carries an idempotency key.

Type checking

The package includes a py.typed marker and inline type annotations for type checkers that implement PEP 561.

Security

  • Keep management API keys out of browser bundles, mobile apps, logs, and source control.
  • Give each integration the smallest set of scopes it needs.
  • Use upload_to_url for presigned storage uploads. It does not attach SteadyLink authentication headers.
  • Report vulnerabilities through GitHub private vulnerability reporting.

Documentation

Development

python -m pip install build pytest twine
pytest
python -m build
python -m twine check dist/*

See the contributing guide for the development and release process.

License

MIT

Metadata

Release files for steadylink 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for steadylink 0.1.0
File Size Uploaded Provenance Actions
steadylink-0.1.0.tar.gz 8.3 kB With provenance Details for steadylink-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for steadylink 0.1.0
File Interpreter ABI Platform Actions
steadylink-0.1.0-py3-none-any.whl Python 3 none any Details for steadylink-0.1.0-py3-none-any.whl

Total release size: 15.7 kB

Security for steadylink 0.1.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page