Python SDK
Coming soon
The Python SDK is in development and not yet published. Today the Rust SDK and the WebAssembly verifier are available; the JS, Python, and Go bindings are on the roadmap. The examples below preview the planned API.
The Python SDK binds to the Rust core via native extensions and exposes an idiomatic, typed API.
Install
bash
pip install osdfVerify a package
bash
from osdf import verify, TrustStore trust = TrustStore.from_dir("./trust")report = verify("contract.osdf", trust=trust) print(report.score) # 100for stage in report.stages: print(f"{stage.name:<14} {stage.status}")Create and sign
bash
from osdf import Builder, SigningKey key = SigningKey.from_pem("signing.key")pkg = ( Builder.from_pdf("contract.pdf") .profile("osdf-verified") .sign(key) .build())pkg.write("contract.osdf")Pipelines
The SDK is thread-safe and releases the GIL during cryptographic work, so it scales across worker pools for batch verification.