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.2.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.2-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aibomstd-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 90dc56efd7b301332d2c689bf23f73fa4c1d317d832d83cb25d27357a59a54bd
MD5 e5112694884c15634405cbf9729446c3
BLAKE2b-256 aeb3392b649ebcf97697e45b2fa2d0a2ce782d8a7f84f428a30be6143b387570

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: aibomstd-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8d24b9b7e3786e18bf8c6c056c85668e389ad7856d2e71808e66e506b96d58ee
MD5 b94e3ff3c8a3be3fa83fe0cdeb173c3f
BLAKE2b-256 0ec6505461f25f538aa8c7e30de258865ae43f7c6d962faca568e4f64afa1aa2

See more details on using hashes here.

Provenance

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