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.1.0.tar.gz (11.3 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.1.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aibomstd-0.1.0.tar.gz
Algorithm Hash digest
SHA256 94ae918474f44f6e13af131831886228e8435b0d4dad67d50612f3a9d53d33d0
MD5 e9bc022f34318c5925659a58b4ebd914
BLAKE2b-256 23daff968282c9dd578886fbfbfc0cf8a3d124aeb2d8404a2994977a6be31cee

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: aibomstd-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ba8fd3f1b6ce7260767f07bc2350168c0616fb837a90c37581f99852a9a1b01
MD5 0f864425d4be868a2b4b0fc4f26a642e
BLAKE2b-256 caf8ec88697d0e8dac6d38b119c63402ab0413f06bbaa55770e71bc9c7f6deae

See more details on using hashes here.

Provenance

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