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
bytessubclass - Provides a convenient interface over
hashlib,base64,zlib,urllib.parse,json,pickleand more - Easy to extend with new formats
TODO
- add more parsing formats like YAML, CBOR, etc.
- optionally use faster third-party modules when available
Release files for binapy 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| binapy-0.8.0.tar.gz | 20.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| binapy-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.3 kB
Release files / binapy-0.8.0.tar.gz
| Download URL | binapy-0.8.0.tar.gz |
|---|---|
| Size | 20.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
570c5098d42f037ffb3d2e563998f3cff69ad25ca1f43f9c3815432dccd08233
|
|
BLAKE2b-256 checksum How to use checksums |
bb1264a6df32e9bf0eea5dd2a448d37bbfe49b4aae0acb20b46381bf76304a0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / binapy-0.8.0-py3-none-any.whl
| Download URL | binapy-0.8.0-py3-none-any.whl |
|---|---|
| Size | 17.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8af1e1e856900ef8b79ef32236e296127c9cf26414ec355982ff7ce5f173504d
|
|
BLAKE2b-256 checksum How to use checksums |
9450a2ca5609cffc918a339be4ec5070c6d1d9fab600e6d9164df18040137383
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|