Skip to main content

saar-sdk

Python client for Saar, a byte-exact lossless compressor.

This package is a thin wrapper over the Saar command-line interface. It does not reimplement the codec: it invokes the installed saar binary and decodes the JSON it prints, so one implementation stays authoritative and the SDK behaves the same as the desktop application.

Install

pip install saar-sdk

The Saar CLI must be installed separately and reachable as saar on PATH, or via SAAR_BIN.

Use

from saar_sdk import SaarClient

client = SaarClient()                  # SAAR_BIN, else saar on PATH
result = client.compress("report.pdf") # -> report.pdf.saar

assert client.verify(result.output).ok
client.decompress(result.output, "restored.pdf")

Contract

Operation Behaviour
version() CLI version string
compress(input, output=None) Default output is <input>.saar
decompress(input, output=None) Default strips .saar
verify(input) Round-trip integrity check; result.ok
detect(input) Detected modality, without compressing
info(input) Describe an existing artifact

Failures raise SaarCommandError, which carries the argv, the exit code and stderr. An existing output file is never overwritten: the CLI refuses and the SDK propagates that refusal.

Licence

Apache-2.0 for this client library. The Saar engine, CLI and file formats remain proprietary and are licensed separately. See NOTICE.

Metadata

Release files for saar-sdk 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for saar-sdk 1.3.0
File Size Uploaded Provenance Actions
saar_sdk-1.3.0.tar.gz 9.8 kB Without provenance Details for saar_sdk-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for saar-sdk 1.3.0
File Interpreter ABI Platform Actions
saar_sdk-1.3.0-py3-none-any.whl Python 3 none any Details for saar_sdk-1.3.0-py3-none-any.whl

Total release size: 20.1 kB

Release files / saar_sdk-1.3.0.tar.gz

Download URL saar_sdk-1.3.0.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a6c3b9ce435b364801fc3d4798a51a9ddde5277561c65865f5c273bf6eb4e60b
BLAKE2b-256 checksum
How to use checksums
2785c7af4f63f739d5252c67b821c192313cfa969ff074ee99b21d32926d810a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Release files / saar_sdk-1.3.0-py3-none-any.whl

Download URL saar_sdk-1.3.0-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3c60d0332adf5fb4b9a2450a76fa368d5d977860700c166286e4517db6f5e56
BLAKE2b-256 checksum
How to use checksums
545ae9117c3ad8f9f01f579854a27c2ed97291fe0a7a7f02e43c9f868df1a120
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Security for saar-sdk 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page