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!").to("deflate").to("b64u")
print(bp)
# b'80jNycnXUQjPL8pJUQQA'
bp.decode_from("b64u").decode_from("deflate").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
,zlib
,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
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
binapy-0.7.0.tar.gz
(18.4 kB
view details)
Built Distribution
binapy-0.7.0-py3-none-any.whl
(15.1 kB
view details)
File details
Details for the file binapy-0.7.0.tar.gz
.
File metadata
- Download URL: binapy-0.7.0.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e26f10ec6566a670e07dcc9de4c223be60984a7b1a2e5436b7eb6555f1d9d23b |
|
MD5 | 47eeb037ba8314eaeba548247372f9b4 |
|
BLAKE2b-256 | 0d18322295f816bc7865b9a778c353af922e8d72e22a76bcd0490cfc7f2ff2c1 |
File details
Details for the file binapy-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: binapy-0.7.0-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 739cd5bebd52715b8c8face6ff815bf5798306cf276b392e959ada85b9a9bee6 |
|
MD5 | 08940e2a3f7cf6fa8b5080a606b9851a |
|
BLAKE2b-256 | 0dc0832f6d03dd22f4031df0dac17a8461626644d959170f4bebbf8002081158 |