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.
  • Limited Responses: A response that is not file content (metadata, a directory listing, an acknowledgement, an error) is read up to 64 MiB, and a larger one raises an error. The limit is filebridge.location.MAX_REPLY_SIZE. File content has no limit.
  • 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.1

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.1
File Size Uploaded Provenance Actions
filebridge-0.5.1.tar.gz 21.2 kB Without provenance Details for filebridge-0.5.1.tar.gz

Built distribution (wheel)

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

Total release size: 47.1 kB

Release files / filebridge-0.5.1.tar.gz

Download URL filebridge-0.5.1.tar.gz
Size 21.2 kB
Tags Source
SHA-256 checksum
How to use checksums
73e89e6957256396855375612a35a7c612e88b90eb22bd37323cc80d9bb66c85
BLAKE2b-256 checksum
How to use checksums
0bee1ac08beaf2919c8170e875fc1211286c6490fa4f86e8df67586811729b90
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.1-py3-none-any.whl

Download URL filebridge-0.5.1-py3-none-any.whl
Size 25.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f80760590f24783d8c420854d3e48863d0dffbbd7c4f0823baa5d1216f16de6
BLAKE2b-256 checksum
How to use checksums
72b05544d50148214c20e26975450d01b84c6abe5df3dcc277166b1733b88e29
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.1

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