Development Status
- 2 - Pre-Alpha
Intended Audience
- Developers
- System Administrators
Natural Language
- English
License
- OSI Approved :: Apache Software License
Operating System
- OS Independent
Programming Language
- Python
- Python :: 3 :: Only
- Python :: 3
- Python :: 3.12
- Python :: 3.13
- Python :: 3.14
- Python :: 3.15
- Python :: Implementation :: CPython
- Python :: Free Threading :: 2 - Beta
- Rust
Topic
- Software Development :: Libraries
smithy-aws-checksums
This package provides the checksum algorithms used by Smithy clients: CRC32,
CRC32C, CRC64NVME, XXHash64, XXHash3, XXHash128, and, through new(), SHA-1,
SHA-256, SHA-512, and MD5.
import smithy_aws_checksums
checksum = smithy_aws_checksums.new("CRC32C")
checksum.update(b"hello world")
checksum.digest()
Native acceleration
The CRC and XXHash algorithms are implemented in Rust and published as wheels for
common platforms. Where no wheel is available, the package installs as pure Python
and produces identical results, much more slowly. HAS_NATIVE_EXTENSION reports
which implementation is in use. CRC32 always uses zlib in pure Python, and the
SHA and MD5 algorithms always use hashlib.
Building
Wheels are built with maturin when cargo is on the
PATH, and as pure Python when no Rust toolchain is installed. If Rust is installed
but can't build the extension, for example because it's older than the
rust-version in Cargo.toml, the build fails with instructions instead of
silently falling back.
Set SMITHY_PYTHON_NATIVE_BUILD to never to build a pure-Python wheel, or to
always to require the native extension even when cargo isn't on the PATH.