A Python library for interacting with the Filebridge daemon (filebridged).
Project description
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.1pydantic>= 2.12.5cryptography>= 44.0.0
Features
- Asynchronous & Synchronous Client: Full native support for async and sync Python environments.
- Streaming Files: Memory-efficient chunked streaming via
stream_readandwrite_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()supportscase_sensitive=Falsefor 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!")
# Glob — case-insensitive on all platforms
for item in loc.glob("*.txt", case_sensitive=False):
print(item.name)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file filebridge-0.2.13.tar.gz.
File metadata
- Download URL: filebridge-0.2.13.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e02cca993091a1dc5c670a24a61a7f980f84fe7bf83fe29680a7333dabfd2b2
|
|
| MD5 |
b07462989741f50568ebda8c021f8765
|
|
| BLAKE2b-256 |
e89a8946916b4a1f338e3e6af69b07c593993f139d874dc7daa2d64cb33802fa
|
File details
Details for the file filebridge-0.2.13-py3-none-any.whl.
File metadata
- Download URL: filebridge-0.2.13-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7394ccc31a2a066360fdc3bb09c83a3671edc06474f0329cb02ed38cd1f02cb4
|
|
| MD5 |
4734cb81581399765bc253c3dc6b92a0
|
|
| BLAKE2b-256 |
b2bc9026a1fb6453cbf658b63439f8d58af996ba73a15c2e865190e8b942e494
|