Binary Data manipulation, for humans.
Project description
BinaPy
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
- Free software: MIT
- Documentation: https://guillp.github.io/binapy/
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file binapy-0.1.0.tar.gz
.
File metadata
- Download URL: binapy-0.1.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.8.2 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bdbd83468d50bc4be85df03b039efea8aa526754f1e8fad8fb9e4c7d54e7611 |
|
MD5 | 906bbc5cf474869eecb843390518a5db |
|
BLAKE2b-256 | ec89a99f44ca20c34890bf487d9b409017fc61cddaf8fff5cfa97c64e62877bd |
File details
Details for the file binapy-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: binapy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.8.2 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 786b8b2804aa113710c6405c4407384067316b7e4e37d0e772c91e6362073812 |
|
MD5 | 770b3f1df287d8dfb855e96a3bc74b11 |
|
BLAKE2b-256 | 2e60aa6d544f39b55cc6b6a5d79bc2b5405e879a4ef53bd3308439ed38c07a50 |