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

Download files

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

Source Distribution

binapy-0.8.0.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

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

binapy-0.8.0-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file binapy-0.8.0.tar.gz.

File metadata

  • Download URL: binapy-0.8.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for binapy-0.8.0.tar.gz
Algorithm Hash digest
SHA256 570c5098d42f037ffb3d2e563998f3cff69ad25ca1f43f9c3815432dccd08233
MD5 654d36d00a6b85d3fab44bf8afd8c3c9
BLAKE2b-256 bb1264a6df32e9bf0eea5dd2a448d37bbfe49b4aae0acb20b46381bf76304a0a

See more details on using hashes here.

File details

Details for the file binapy-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: binapy-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for binapy-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8af1e1e856900ef8b79ef32236e296127c9cf26414ec355982ff7ce5f173504d
MD5 cb31e001e9c82dd2a451291134c36647
BLAKE2b-256 9450a2ca5609cffc918a339be4ec5070c6d1d9fab600e6d9164df18040137383

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 files

0.7.0

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

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