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)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

filebridge-0.4.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

filebridge-0.4.0-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file filebridge-0.4.0.tar.gz.

File metadata

  • Download URL: filebridge-0.4.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for filebridge-0.4.0.tar.gz
Algorithm Hash digest
SHA256 4ab143a29c5e53d6dd03c5ce8f5644ea146c1e3efb50f7e303b61d9905f402e9
MD5 ed9d72b609d4698b1666893a26f0882b
BLAKE2b-256 02b401e83afd7e354266c8a4152a9795853fca9a1118d9e1e1bddde8694e200f

See more details on using hashes here.

File details

Details for the file filebridge-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: filebridge-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for filebridge-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01f9b32bf02453cd7364736bfcb27faa5b19b5456f1d88e70d0103b18774f8c3
MD5 4e2af6f8b01032d43d36362f6f061fe0
BLAKE2b-256 56164a265895c0c15d9160b625a50532d7bd0b6d5fa42b99bb1ed2d565042a1c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.3.1

2 files

0.3.0

2 files

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.8

2 files

0.2.4

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.0

2 files

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