--- id: binapy version: "0.8.0" license: MIT license_treatment: permissive maintenance: dormant --- # binapy — Binary Data manipulation, for humans. License: permissive · Maintenance: dormant · Downloads: 1.0M/mo ## What it is and what it does BinaPy is a thin wrapper around Python's standard binary-handling modules (hashlib, base64, zlib, urllib.parse, json, pickle) that chains operations through a fluent interface. Instead of calling separate functions or methods in sequence, you chain `.to()` and `.decode_from()` calls on a BinaPy object (which is itself a bytes subclass), making code more readable when performing multiple encoding, compression, or hashing steps in sequence. The package targets developers who work with binary data transformations—encoding to base64url, compressing with gzip or deflate, hashing with SHA256, URL-encoding, and similar tasks. It does not add new functionality beyond what the standard library offers; it reorganizes and chains existing operations. The single runtime dependency is typing-extensions, and it supports Python 3.8 through 3.12. Use it for: - Chain multiple encoding steps (e.g., compress then base64-encode) in a single readable expression. - Simplify hash computation with optional salt by calling a single method instead of hashlib boilerplate. - Decode layered data (e.g., base64url-wrapped deflate-compressed JSON) by chaining decode_from calls. - Extend the library with custom formats by subclassing or registering new codecs. - Reduce repetitive imports and function calls when working with standard compression and encoding formats. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. BinaPy wraps Python's binary-handling libraries (hashlib, base64, zlib, urllib.parse, json, pickle) into a fluent, chainable interface for encoding, decoding, compressing, and hashing data. Yes, if you frequently chain multiple binary transformations and prefer a fluent API over repeated standard-library calls. No, if you only use one or two encoding/hashing operations per script—the standard library is already straightforward and requires no dependency. Caution: Pre-Alpha status and dormant maintenance (last release January 2024) mean the API may change and bugs may not be addressed quickly. ## Install pip install binapy uv add binapy poetry add binapy ## Installing binapy Before you install: Low install friction; single pure-Python dependency (typing-extensions). Maintenance is dormant—last release January 2024, last commit August 2024, repository not archived but showing minimal activity. Pre-Alpha status (Development Status :: 2) suggests the API may still shift. License in practice: MIT license (permissive) places no restrictions on use, modification, or distribution in your own projects. Quickstart: from binapy import BinaPy # Compress and encode bp = BinaPy("Hello, World!").to("deflate").to("b64u") print(bp) # b'80jNycnXUQjPL8pJUQQA' # Decode and decompress original = bp.decode_from("b64u").decode_from("deflate").ascii() print(original) # "Hello, World!" Verify before relying: - Whether the fluent interface and method-chaining design actually reduce boilerplate compared to standard library calls in realistic workflows. - Performance characteristics relative to direct hashlib/base64/zlib calls, especially for large data. - Stability of the API given Pre-Alpha classification and dormant maintenance status. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 1.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags binary data encoding decoding, base64 hex compression, fluent bytes manipulation, hashlib wrapper, data format conversion, binary-data, fluent-interface, encoding-decoding [View on SkillFed](https://skillfed.io/packages/binapy) · [View on PyPI](https://pypi.org/project/binapy/)