blake3-py provides high-performance Python bindings for the BLAKE3 cryptographic hash function, implemented in Rust. It offers a fast, secure, and modern hashing algorithm. The current version is 1.0.8, with releases typically driven by updates to the underlying Rust `blake3` crate, PyO3, or support for new Python versions.
pip install blake3Verified import paths — ran on the pinned version, not inferred.
Demonstrates both one-shot hashing of a complete data block and incremental hashing for streaming data.
Ensure Rust and Cargo are installed (e.g., via `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`) before attempting to install `blake3` if you encounter build errors.
Update your Rust toolchain to version 1.80 or newer using `rustup update`.
Initialize `hasher = blake3.Hasher()` and feed data chunks using `hasher.update(data_chunk)` before calling `hasher.finalize()`.
Ensure the 'blake3' library is fully and correctly installed. If building from source, verify your Rust toolchain is properly configured and up-to-date (refer to warning 0 and 1 for Rust-related issues). Consider reinstalling 'blake3' in a clean virtual environment or checking for environment-specific compilation problems.
Install the package using pip: `pip install blake3`
Ensure you are using the correct import statement `import blake3` or `from blake3 import blake3` as needed. If the issue persists, try reinstalling the package: `pip uninstall blake3` then `pip install blake3`. Also, check for any local Python files or folders named `blake3.py` or `blake3` that might be shadowing the installed package.
Install or update the Rust toolchain: `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` followed by `rustup update`. Ensure a compatible C compiler (like GCC or Clang) is installed and accessible in your system's PATH. On Windows, installing 'Build Tools for Visual Studio' might resolve it.
Encode the string to bytes before passing it to the BLAKE3 hasher, typically using UTF-8 encoding: `hasher.update(my_string.encode('utf-8'))`Ensure the key passed to `blake3.blake3(key=...)` or `blake3.blake3(key_material=...)` is a bytes object of exactly 32 bytes. You can generate a random 32-byte key using `secrets.token_bytes(32)`.
No dependency data recorded yet.