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").ascii()
# "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
,pickle
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.8.0.tar.gz
(20.3 kB
view hashes)
Built Distribution
binapy-0.8.0-py3-none-any.whl
(17.0 kB
view hashes)