Skip to main content

Binary Data manipulation, for humans.

Project description

BinaPy

made-with-python Downloads Supported Versions PyPi license PyPI status GitHub commits GitHub latest commit

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").decode()
# "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 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

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

binapy-0.6.0.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

binapy-0.6.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: binapy-0.6.0.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for binapy-0.6.0.tar.gz
Algorithm Hash digest
SHA256 1054b0ef1e6eccd941d4b23167ba4c5b1f5938960750686c421edc71af543fa7
MD5 69d5d90d88a34b5dd24835d87fb40e74
BLAKE2b-256 9f4e04b3218eb9d952c677c91315a19c28f93660ee539229639af50142d88583

See more details on using hashes here.

File details

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

File metadata

  • Download URL: binapy-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for binapy-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ffc2812df7f43a50ed45f451af8a6f851c87e347e3a071bb0f423a1a60d8a39
MD5 56c0f9617d2247cb5e4b9fff984a49de
BLAKE2b-256 b2f3fdf9adeaf8dc67645cfaa16412e0fbc10a1a0d17d81f74c1c3a3f560b712

See more details on using hashes here.

Supported by

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