Skip to main content

AI Bill of Materials Standard — open standard SDK for AI component transparency

Project description

aibomstd Python SDK

Python SDK for the aibomstd open standard. Generate AI Bill of Materials in 10 lines of code.

Install

pip install aibomstd

Quick start

from aibomstd import (
    AiBomBuilder,
    ModelComponent,
    ApiClientComponent,
    FrameworkComponent,
    Identity,
    License,
    Service,
    RiskFlag
)

bom = AiBomBuilder(
    subject_name="my-ai-service",
    subject_type="repository",
    subject_version="1.0.0"
)

bom.add_component(
    ModelComponent(
        bom_ref="model-001",
        identity=Identity(
            name="llama-3-8b-instruct",
            provider="meta",
            version="3.0",
            source="huggingface",
            purl="pkg:huggingface/meta-llama/Meta-Llama-3-8B-Instruct@3.0"
        ),
        license=License(id="llama3", osi_approved=False, risk="medium")
    )
)

bom.add_component(
    ApiClientComponent(
        bom_ref="api-client-001",
        identity=Identity(
            name="openai",
            provider="openai",
            version="1.40.0",
            source="pypi",
            purl="pkg:pypi/openai@1.40.0",
            is_external=True
        ),
        service=Service(
            name="OpenAI API",
            endpoint="https://api.openai.com/v1",
            models_used=["gpt-4o"],
            data_leaves_boundary=True,
            data_residency="US"
        ),
        license=License(id="Apache-2.0", osi_approved=True, risk="none"),
        risks=[
            RiskFlag(
                id="AIBOM-R001",
                type="data-egress",
                severity="high",
                description="Data sent to OpenAI. US jurisdiction.",
                regulation="GDPR"
            )
        ]
    )
)

print(bom.to_json())

Output formats

bom.to_json()          # aibomstd JSON
bom.to_html()          # self-contained HTML report
bom.to_cyclonedx()     # CycloneDX v1.7 JSON

Convert from cisco-aibom

from aibomstd.converters.cisco import CiscoConverter
import json

cisco_output = json.load(open("cisco-scan-result.json"))
converter = CiscoConverter()
aibomstd_json = converter.convert(cisco_output)
print(json.dumps(aibomstd_json, indent=2))

Schema

Every output document references: https://aibomstd.com/schema/v0.1/aibomstd.schema.json

License

Apache 2.0 — https://aibomstd.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aibomstd-0.2.3.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aibomstd-0.2.3-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file aibomstd-0.2.3.tar.gz.

File metadata

  • Download URL: aibomstd-0.2.3.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for aibomstd-0.2.3.tar.gz
Algorithm Hash digest
SHA256 c1bf176fd286da3d84af922b07ad91602d3f08cc435c61d9a090ea3d362fa620
MD5 57ce0edc8e47c0fcff1efeef4e6b3497
BLAKE2b-256 c770a26765730c1721cc5cae90817ebb0eda8223a6750beeb02c8b389c042eb3

See more details on using hashes here.

Provenance

The following attestation bundles were made for aibomstd-0.2.3.tar.gz:

Publisher: publish-pypi.yml on aibomstd/aibomstd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aibomstd-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: aibomstd-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for aibomstd-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e6af495ae47ef9fff12e0de6354d5d08886c2dcfffe4a20f6c25245302c99653
MD5 3a9cbbec229e22c42261f29da3dad61d
BLAKE2b-256 05963e871f0045b7da4da11919c3df3071a1d718092574d0645be51532ce9892

See more details on using hashes here.

Provenance

The following attestation bundles were made for aibomstd-0.2.3-py3-none-any.whl:

Publisher: publish-pypi.yml on aibomstd/aibomstd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page