Skip to main content

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.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!")

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

Project details


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.1.3.tar.gz (12.3 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.1.3-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: filebridge-0.1.3.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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.1.3.tar.gz
Algorithm Hash digest
SHA256 cb94f4ac9a155c694aaaa8de0627a65fdf9f8c58e0db297cbac7aabf81dfaac2
MD5 d5889462b5638c8af007c77738e7a94a
BLAKE2b-256 4a4041706ab495e6bea64d6cddb96be99ec5c6f448a543ebaa3a8b6af8343e86

See more details on using hashes here.

File details

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

File metadata

  • Download URL: filebridge-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d64c465b75b6c11a95e9700910d7570e8d00c16b68db4a79c40f2dea0be6caf2
MD5 b2f1b30e19f76fd5d48c4980427390c1
BLAKE2b-256 35e5ca7ad312d71efea5da7a3e962d210bf758a8666472c8169d850f9c3a44d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page