Skip to content

Extensions Library

The Extensions Library provides extensible components and utilities for enhancing the core SDK functionality. It enables use-case-specific implementations, semantic data processing, and custom business logic integration within the Tractus-X dataspace ecosystem.

Overview

The Extensions Library abstracts domain-specific operations and offers:

  • Semantic Extensions: Transform SAMM (Semantic Aspect Meta Model) schemas to JSON-LD contexts for semantic data processing.
  • Schema Processing: Handle schema validation, transformation, and context generation.
  • Extensibility Framework: Support for custom use-case implementations (certificate management, PCF calculation, etc.).
  • JSON-LD Context Generation: Convert aspect models into standardized JSON-LD formats for linked data processing.
  • Schema Discovery Integration: Fetch and process semantic models from centralized repositories.

Architecture

The library follows a modular architecture with support for multiple extension types:

Text Only
tractusx_sdk/extensions/
├── semantics/                          # Semantic processing extensions
│   ├── schema_to_context_translator.py # SAMM schema to JSON-LD conversion
│   └── __init__.py
├── README.md
└── __init__.py

For a deeper dive into the SDK structure, see SDK Structure and Components.

Key Components

  • SAMM Schema Context Translator: Converts SAMM (Semantic Aspect Meta Model) schemas to JSON-LD contexts for semantic data processing (schema_to_context_translator.py). Supports both flattened and nested JSON-LD output formats with circular reference handling.
  • Schema To Schema Flattening: Transforms complex SAMM aspect models into JSON-LD contexts while maintaining semantic relationships.
  • Nested Context Generation: Creates nested JSON-LD contexts for hierarchical aspect model structures.
  • Schema Reference Resolution: Dynamically resolves and fetches schema definitions from the Eclipse Tractus-X semantic models repository.

Use Cases

Extensions enable domain-specific implementations such as:

  • Certificate Management: Handling product certifications and compliance data
  • Product Carbon Footprint (PCF): Calculating and managing carbon emissions data
  • Custom Business Logic: Implementing domain-specific rules and validations
  • Semantic Data Processing: Leveraging linked data for advanced data interoperability

Usage

To get started, install the SDK and import semantic extensions:

Python
from tractusx_sdk.extensions.semantics import SammSchemaContextTranslator

See the Getting Started for setup instructions and first steps.

Further Reading

NOTICE

This work is licensed under the CC-BY-4.0.

  • SPDX-License-Identifier: CC-BY-4.0
  • SPDX-FileCopyrightText: 2025, 2026 Contributors to the Eclipse Foundation
  • SPDX-FileCopyrightText: 2025, 2026 Catena-X Automotive Network e.V.
  • SPDX-FileCopyrightText: 2025, 2026 LKS Next
  • SPDX-FileCopyrightText: 2025, 2026 Mondragon Unibertsitatea
  • Source URL: https://github.com/eclipse-tractusx/tractusx-sdk