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.
  • 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.4.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.4.0
File Size Uploaded Provenance
filebridge-0.4.0.tar.gz 16.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 38.8 kB

Release files / filebridge-0.4.0.tar.gz

Download URL filebridge-0.4.0.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4ab143a29c5e53d6dd03c5ce8f5644ea146c1e3efb50f7e303b61d9905f402e9
BLAKE2b-256 checksum
How to use checksums
02b401e83afd7e354266c8a4152a9795853fca9a1118d9e1e1bddde8694e200f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","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.4.0-py3-none-any.whl

Download URL filebridge-0.4.0-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01f9b32bf02453cd7364736bfcb27faa5b19b5456f1d88e70d0103b18774f8c3
BLAKE2b-256 checksum
How to use checksums
56164a265895c0c15d9160b625a50532d7bd0b6d5fa42b99bb1ed2d565042a1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","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.4.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.

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