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("gzip").to("b64u")
print(bp)
# b'eJzzSM3JyddRCM8vyklRBAAfngRq'
bp.decode_from("b64u").decode_from("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.5.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

binapy-0.5.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: binapy-0.5.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for binapy-0.5.0.tar.gz
Algorithm Hash digest
SHA256 d567f046cf617cef041d326cea6eb8411498f3f430532ef3125f87511edcd399
MD5 ccd6828b652bd1fed8a98ef6a69af46b
BLAKE2b-256 62a539e223787d3197bec0c12f693431de1d667279daa49c5e9e9dc9733774e7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: binapy-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for binapy-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ccc35bb366df1d94f5f2ff8da57b6400d3392a0bf487c38fad88a9662f8ad15
MD5 4705efb2a081316c57ddfbaebab0817a
BLAKE2b-256 f15c25b65634ef9d022913b36b16af7b25e2d1f67b8f0bf897aff0a31014e2a8

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