Metadata-Version: 2.4
Name: smithy-aws-checksums
Version: 0.1.1
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Free Threading :: 2 - Beta
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: Libraries
License-File: LICENSE-THIRD-PARTY
License-File: NOTICE
Summary: Checksum algorithms for Smithy tooling, with native acceleration.
Keywords: smithy,sdk,checksum,crc32c,crc64nvme,xxhash
Author: Amazon Web Services
License: Apache License 2.0
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-aws-checksums/CHANGELOG.md
Project-URL: Code, https://github.com/smithy-lang/smithy-python/blob/develop/packages/smithy-aws-checksums/
Project-URL: Issue tracker, https://github.com/smithy-lang/smithy-python/issues

# 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.

```python
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](https://www.maturin.rs/) 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`.

