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.1.tar.gz (16.8 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.1-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aibomstd-0.2.1.tar.gz
  • Upload date:
  • Size: 16.8 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.1.tar.gz
Algorithm Hash digest
SHA256 9043ff03e04632a76da66edd16d7495bf4d5d5441ec8cbaeaeea6bf7b87d4580
MD5 543a31dee7e362c1866cbd93551ea1b2
BLAKE2b-256 b2a408d31d69e6274042a7d5c184a6c964d439fc947b472346c2436fe8e8d152

See more details on using hashes here.

Provenance

The following attestation bundles were made for aibomstd-0.2.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: aibomstd-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8bc4347dfd0993767a1ae2f7c745082cd2ff180e79c2f4fca4b304beee5f6f98
MD5 c35a3a807ef0ec2036d4eed168d670d9
BLAKE2b-256 ae9a1d2ed63a1e7cbdee46afef21fd1952b80cf2686494dd7cfe015ed15a962c

See more details on using hashes here.

Provenance

The following attestation bundles were made for aibomstd-0.2.1-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