New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

binapy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

binapy

Binary Data manipulation, for humans.

  • 0.8.0
  • PyPI
  • Socket score

Maintainers
1

BinaPy

made-with-python Downloads Supported Versions PyPi version PyPI status PyPi license

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

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc