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

Uploaded Source

Built Distribution

binapy-0.3.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: binapy-0.3.0.tar.gz
  • Upload date:
  • Size: 11.6 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.0.tar.gz
Algorithm Hash digest
SHA256 9de4e8b0e184da7eecaaba76484bccf4b8de3fc806942854c815fb01928a84f7
MD5 4de46a3ddad713cd290a3c37348ac6a2
BLAKE2b-256 d05863b458880b08026446220954fd865789b437ef07a6f35d2a2122592d0591

See more details on using hashes here.

File details

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

File metadata

  • Download URL: binapy-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9622700efb69083209bf1b0a7686e7c1826d73de6c41450dee9e07d3db8ac35a
MD5 aea72254f6f5864aa93bf795110d1004
BLAKE2b-256 abb97c0e623bb5cf768ef954ba580962bb3f4eb972a3a0e8af4960ec34bf1f1a

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