Skip to main content

Python bindings for b64t (requires system package)

Project description

b64t - Python Bindings (Wrapper Package)

This is a minimal wrapper package for the system-installed b64t library.

Installation

1. Install system package (required)

macOS (Homebrew):

curl -fsSL https://pkg.vivantilabs.com/b64t/homebrew/setup.sh | bash

Or manually:

brew tap vivanti/b64t
brew install vivanti/b64t/b64t

Linux (APT - Debian/Ubuntu):

curl -fsSL https://pkg.vivantilabs.com/b64t/apt/setup.sh | sudo bash
sudo apt install b64t

Linux (YUM/DNF - RHEL/CentOS/Fedora):

curl -fsSL https://pkg.vivantilabs.com/b64t/yum/setup.sh | sudo bash
sudo dnf install b64t

FreeBSD:

curl -fsSL https://pkg.vivantilabs.com/b64t/pkg/setup.sh | sudo bash
sudo pkg install b64t

2. Install pip wrapper (for virtual environments)

python3 -m venv myenv
source myenv/bin/activate
pip install b64t

Usage

import b64t

# Encode
encoded = b64t.encode(b'Hello, World!')
print(encoded)

# Decode
decoded = b64t.decode(encoded)
print(decoded)

# Streaming
with open('input.bin', 'rb') as f:
    for chunk in b64t.encodePipe(f):
        print(chunk)

How It Works

This wrapper automatically detects your Python distribution and uses the optimal loading strategy:

  • Homebrew/python.org/Linux Python: Loads the native C extension for maximum performance (Stable ABI, one binary for Python 3.8+)
  • Apple system Python (/usr/bin/python3): Uses ctypes to call libb64t.dylib directly, bypassing C extension ABI incompatibilities with Apple's Python shim

Notes

  • This package requires the system b64t package to be installed via Homebrew (macOS), APT (Debian/Ubuntu), YUM/DNF (RHEL/CentOS/Fedora), or FreeBSD pkg
  • If the system package is not installed, import will fail with a clear error message

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

b64t-0.1.77.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

b64t-0.1.77-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file b64t-0.1.77.tar.gz.

File metadata

  • Download URL: b64t-0.1.77.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for b64t-0.1.77.tar.gz
Algorithm Hash digest
SHA256 da74c45a7775722775d29dab987af1a2a50be4cd860c369412aad48b0d24f7d7
MD5 193cca6e31a5b92172142896015f2d44
BLAKE2b-256 3b314e653289ce279140e4c88018a300747e1be18ba339f41d7310999e6be37d

See more details on using hashes here.

File details

Details for the file b64t-0.1.77-py3-none-any.whl.

File metadata

  • Download URL: b64t-0.1.77-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for b64t-0.1.77-py3-none-any.whl
Algorithm Hash digest
SHA256 25a07ef379deadfad07e3e32b21cfcdad6b58700bcedf15ed7c7e6b27af94e81
MD5 5da1c5ed851f63549011c1f7c7deb8d4
BLAKE2b-256 eb20378a08c81be95d1542fde52c3577b289a520c23dfd3a8c97ee024302e892

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