lacuna.bundle
Portable, verifiable reproducibility bundles.
Generated from Lacuna 0.14.3. For what these do and when to use them, read the guide.
Classes
BundleArtifact
class BundleArtifact(path: str, role: str, media_type: str, sha256: str, size: int) One checksummed member declared by a bundle manifest.
| Field | Type | Default |
|---|---|---|
path | str | required |
role | str | required |
media_type | str | required |
sha256 | str | required |
size | int | required |
BundleArtifact.to_dict
def to_dict() -> dict[str, object] BundleManifest
class BundleManifest(
producer_version: str,
report_schema_version: str,
report_method: str,
report_method_version: int,
report_input_fingerprint: str | None,
artifact_set_sha256: str,
artifacts: tuple[BundleArtifact, ...],
format: str = 'lacuna.reproducibility-bundle',
bundle_version: int = 1,
reproducibility_level: str = 'identifiable',
) Parsed version-1 manifest for a Lacuna reproducibility bundle.
| Field | Type | Default |
|---|---|---|
producer_version | str | required |
report_schema_version | str | required |
report_method | str | required |
report_method_version | int | required |
report_input_fingerprint | str | None | required |
artifact_set_sha256 | str | required |
artifacts | tuple[BundleArtifact, ...] | required |
format | str | 'lacuna.reproducibility-bundle' |
bundle_version | int | 1 |
reproducibility_level | str | 'identifiable' |
BundleManifest.to_dict
def to_dict() -> dict[str, object] BundleManifest.from_dict
@classmethod
def from_dict(cls, value: Mapping[str, object]) -> BundleManifest Parse a strict standalone bundle-v1 manifest without reading archive members.
BundleManifest.from_json
@classmethod
def from_json(cls, value: str) -> BundleManifest Parse finite bundle-v1 manifest JSON while rejecting duplicate keys.
BundleVerification
class BundleVerification(
path: Path,
manifest: BundleManifest,
archive_sha256: str,
total_size: int,
) Successful structural and digest verification of a local bundle.
| Field | Type | Default |
|---|---|---|
path | Path | required |
manifest | BundleManifest | required |
archive_sha256 | str | required |
total_size | int | required |
BundleVerification.artifact_count
artifact_count: int BundleVerification.to_dict
def to_dict() -> dict[str, object] Functions
create_bundle
def create_bundle(
report: AuditReport,
path: str | os.PathLike[str],
*,
configuration: Mapping[str, object] | None = None,
evidence: Mapping[str, AnalysisResult] | None = None,
provenance: Mapping[str, object] | None = None,
invocation: Mapping[str, object] | None = None,
overwrite: bool = False,
) -> Path Create a deterministic version-1 evidence bundle without source data or code.
verify_bundle
def verify_bundle(path: str | os.PathLike[str]) -> BundleVerification Verify bundle structure and SHA-256 integrity without extracting or executing content.
Types and constants
BUNDLE_FORMAT
BUNDLE_FORMAT = 'lacuna.reproducibility-bundle' BUNDLE_VERSION
BUNDLE_VERSION = 1