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

Uploaded Source

Built Distribution

binapy-0.3.2-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: binapy-0.3.2.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.8.2 Windows/10

File hashes

Hashes for binapy-0.3.2.tar.gz
Algorithm Hash digest
SHA256 38b50fb7365d9dc991408cd10640d98af0f2c0c79c9ffdd98fca8cea5a1fac71
MD5 068c9c904902e4d1fe17bb346957d206
BLAKE2b-256 37a6ae60d4f3e4b3dab1120407ffb5aaf88b66c81c93245aa44dd6160643c433

See more details on using hashes here.

File details

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

File metadata

  • Download URL: binapy-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.8.2 Windows/10

File hashes

Hashes for binapy-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 72216bc0f75b44af6b082dca10034df4589c548eaf2b283ce881573338638436
MD5 f5f51a98669e1b195e04a36aabfc919c
BLAKE2b-256 8ead3cf9534168835760ea176a13d39339a83c6f943344ab938b0af62a1a6acb

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