Skip to main content

Filebridge Python Client

A Python client library for interacting with the Filebridge daemon (filebridged). Built on httpx and pydantic, it provides synchronous and asynchronous access to remote files via the filebridge REST API, including chunked streaming and transparent ChaCha20Poly1305 encryption when a token is configured.

Requirements

  • Python >= 3.10
  • httpx >= 0.28.1
  • pydantic >= 2.12.5
  • cryptography >= 44.0.0

Features

  • Asynchronous & Synchronous Client: Full native support for async and sync Python environments.
  • Streaming Files: Memory-efficient chunked streaming via stream_read and write_stream.
  • Automatic Encryption: Secure ChaCha20Poly1305 AEAD streaming encryption natively handled whenever a token is used.
  • Metadata Privacy: In token mode, file paths and parameters are transmitted encrypted — not visible in the URL.
  • Verified Responses: In token mode every response is decrypted and verified, including errors and the acknowledgement of a write, delete or rename. A response that is not an encrypted one raises UnverifiedResponseError, a subclass of AuthenticationError. The usual causes are a wrong token, clocks more than 30 seconds apart, and a server older than 0.5. A download that was cut off or altered in transit raises it as well.
  • SHA-256 Hashing: info(extensive=True) / stat(extensive=True) requests the server to compute and return the SHA-256 hash of a file. Results are cached server-side and only recomputed when the file changes.
  • Glob Matching: glob() supports case_sensitive=False for case-insensitive file name matching (portable across Linux and Windows).

Usage

from filebridge import FileBridgeClient

client = FileBridgeClient("http://localhost:8000")
loc = client.location("demo", token="my-secret-token")

# Read metadata for a file
info = loc.info("/path/to/file.txt")
print(f"File size: {info.size} bytes")

# Read metadata including SHA-256 hash (computed and cached server-side)
info = loc.info("/path/to/file.txt", extensive=True)
print(f"SHA-256: {info.sha256}")

# stat() is an alias for info()
meta = loc.stat("/path/to/file.txt", extensive=True)

# Read a file
data = loc.read("/path/to/file.txt")

# Write a file
loc.write("/path/to/file.txt", b"Hello, World!")

# Rename/move within the location. Write to a temporary name and rename it into
# place, and a concurrent reader never sees a half-written file.
loc.write("/tmp/entry.dat", payload)
loc.rename("/tmp/entry.dat", "/queue/entry.dat")

# Glob — case-insensitive on all platforms
for item in loc.glob("*.txt", case_sensitive=False):
    print(item.name)

Metadata

Release files for filebridge 0.5.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 filebridge 0.5.0
File Size Uploaded Provenance Actions
filebridge-0.5.0.tar.gz 20.7 kB Without provenance Details for filebridge-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 46.0 kB

Release files / filebridge-0.5.0.tar.gz

Download URL filebridge-0.5.0.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
fa2b4e07df6f5e9de1ea1622382c1cee170508811376bb627ee05429623f3ae9
BLAKE2b-256 checksum
How to use checksums
1787e167de77f62e5ab9abbc66399a12ba2fae629d0ca10218384e58d4aa5b25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / filebridge-0.5.0-py3-none-any.whl

Download URL filebridge-0.5.0-py3-none-any.whl
Size 25.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c52a18f3cee2c5aa93ba7e25a5faf770fbe358f1965d2fc9427c17aa68b90f8
BLAKE2b-256 checksum
How to use checksums
8486be4f58c57970dd2dff38a70018705948dee88b6f1ada35c18bd153c771b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for filebridge 0.5.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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