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!").compress_gzip().encode_b64u()
print(bp)
# b'eJzzSM3JyddRCM8vyklRBAAfngRq'
bp.decode_b64u().decompress_gzip().decode()
# "Hello, World!"
isinstance(bp, bytes)
# True

Features

  • Fluent interface, based on a bytes subclass
  • Provides a convenient interface over hashlib, base64, gzip, 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

Credits

This package template was created with Cookiecutter and the zillionare/cookiecutter-pypackage project template.

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.4.0.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

binapy-0.4.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: binapy-0.4.0.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for binapy-0.4.0.tar.gz
Algorithm Hash digest
SHA256 61167ce365326a6a35166f2ac7ed0f729e7973c269619853ccbd714aa032e1ca
MD5 378b36a77131b57606de9476dae8422a
BLAKE2b-256 bdd4118a90c5361e5bd96ade1cf69fdec63d769d62be7b4e3b1d6a0e37b0d72b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: binapy-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for binapy-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9443a245d085514116744e10be707a8d2665cb587ae9c877da27ccf9554af70
MD5 73c430d4c9f1c5564bfdd11724ee9088
BLAKE2b-256 604bd39cd6bee429bdeca0c072757672dcb533078f5e2fc731751236f6215a0d

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