Skip to main content

BinaPy

made-with-python Downloads Supported Versions PyPi version PyPI status PyPi license

BinaPy is a module that makes Binary Data manipulation simpler and easier than what is offered in the Python standard library.

With BinaPy, encoding or decoding data in a number of formats (base64, base64url, hex, url-encoding, etc.), compressing or decompressing (gzip), hashing (SHA1, SHA256, MD5, etc., with or without salt), is all a single method call away! And you can extend it with new formats and features.

from binapy import BinaPy

bp = BinaPy("Hello, World!").to("deflate").to("b64u")
print(bp)
# b'80jNycnXUQjPL8pJUQQA'
bp.decode_from("b64u").decode_from("deflate").ascii()
# "Hello, World!"
isinstance(bp, bytes)
# True

Features

  • Fluent interface, based on a bytes subclass
  • Provides a convenient interface over hashlib, base64, zlib, urllib.parse, json, pickle and more
  • Easy to extend with new formats

TODO

  • add more parsing formats like YAML, CBOR, etc.
  • optionally use faster third-party modules when available

Release files for binapy 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for binapy 0.8.0
File Size Uploaded
binapy-0.8.0.tar.gz 20.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for binapy 0.8.0
File Interpreter ABI Platform
binapy-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 37.3 kB

Release files / binapy-0.8.0.tar.gz

Download URL binapy-0.8.0.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
570c5098d42f037ffb3d2e563998f3cff69ad25ca1f43f9c3815432dccd08233
BLAKE2b-256 checksum
How to use checksums
bb1264a6df32e9bf0eea5dd2a448d37bbfe49b4aae0acb20b46381bf76304a0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / binapy-0.8.0-py3-none-any.whl

Download URL binapy-0.8.0-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8af1e1e856900ef8b79ef32236e296127c9cf26414ec355982ff7ce5f173504d
BLAKE2b-256 checksum
How to use checksums
9450a2ca5609cffc918a339be4ec5070c6d1d9fab600e6d9164df18040137383
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release 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