Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

xtce-lib

Python License: MIT Development Status Code Style Package Manager

xtce-lib provides Python tools for working with XTCE databases.

It focuses on three pieces of functionality:

  • A unified, Pythonic XTCE model that flattens version-specific XML structure into a cleaner API.
  • XTCE file parsing and schema validation for XTCE 1.1, 1.2, and 1.3 files.
  • XTCE path and registry helpers for resolving references inside a database.

Alpha software: the API is not stable yet and may change in future releases.

Supported Versions

xtce-lib currently supports XTCE versions 1.1, 1.2, and 1.3.

Installation

From PyPI:

pip install xtce-lib

Quick Start

Create an XTCE database

from xtce_lib import XtceDatabase, xtce

db = XtceDatabase(name="CONKSAT1")

db.command_metadata = xtce.CommandMetadata(
    argument_types=[
        xtce.IntegerArgument(
            name="uint32",
            encoding_type=xtce.IntegerDataEncoding(
                encoding=xtce.IntegerEncoding.UNSIGNED,
                size_in_bits=32,
            ),
            signed=False,
        ),
        xtce.FloatArgument(
            name="float32",
            encoding_type=xtce.FloatDataEncoding(
                encoding=xtce.FloatEncoding.IEEE754,
                size_in_bits=32,
            ),
        ),
    ],
)

The database model removes XML-only intermediate nodes, so you can work with the model directly:

for argument in db.command_metadata.argument_types:
    print(argument.name)

After creating the database, writing to an XTCE document is as simple as:

from pathlib import Path
from xtce_lib import XtceFile, XtceVersion

db.to_file(Path("CONKSAT1_XTCE.xml"), XtceVersion.V1_2)

Parse an XTCE file

from pathlib import Path
from xtce_lib import XtceDatabase, XtceFile

xtce_file = XtceFile(Path("CONKSAT1-XTCE.xml"))
db: XtceDatabase = xtce_file.database

XtceFile can validate the XTCE against the XML schema and parse the XML into the unified XtceDatabase model.

Work with object paths

>>> from xtce_lib import XtcePath
>>> path = XtcePath("/CONKSAT1/BUS[2].BatteryVoltage")
>>> root_path = XtcePath("/CONKSAT1")
>>> path.relative_to(root_path)
XtcePath('BUS[2].BatteryVoltage')
>>> path.contains_array
True
>>> path.contains_aggregate
True

XtcePath is a pathlib-like helper for XTCE hierarchies, including support for array and aggregate objects.

Development Roadmap

  • Write a class to represent XTCE object paths (XtcePath)
  • Generate Python representations of the XML schemas with xsdata
  • Write a class to represent an XTCE file (XtceFile)
  • Write a class to represent the unified XTCE model (XtceDatabase)
  • Scaffold the structure of the unified XTCE model
  • Implement all base subclasses in the unified model, including translation methods
    • Algorithm models
    • Array models
    • Calibrator models
    • Common models
    • Condition models
    • Range models
    • Reference models
    • Stream models
    • Time models
    • Trigger models
    • Verifier models
    • Alarm models
    • Codec models
    • Datatype models
    • Argument models
    • Container models
    • Command models
    • Parameter models
    • Telemetry models
    • Space system
    • Enum models
  • Refactor translation methods for inherited classes
  • Implement unified model serialization and deserialization
  • Release alpha
  • Fix the many things I messed up in the alpha
  • Fix unit tests
  • Implement full model semantic validation
  • Write end-to-end tests for generating and parsing XTCE files
  • Write documentation
    • Add examples to all applicable model Fields
    • Automate API documentation generation

Disclaimer

This project is an independent open-source implementation and is not affiliated with, endorsed by, or sponsored by the Object Management Group (OMG). XTCE is a specification developed by OMG. All trademarks are the property of their respective owners.

Metadata

Release files for xtce-lib 0.1.0a3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xtce-lib 0.1.0a3
File Size Uploaded Provenance Actions
xtce_lib-0.1.0a3.tar.gz 522.4 kB With provenance Details for xtce_lib-0.1.0a3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xtce-lib 0.1.0a3
File Interpreter ABI Platform Actions
xtce_lib-0.1.0a3-py3-none-any.whl Python 3 none any Details for xtce_lib-0.1.0a3-py3-none-any.whl

Total release size: 970.8 kB

Release files / xtce_lib-0.1.0a3.tar.gz

Download URL xtce_lib-0.1.0a3.tar.gz
Size 522.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1f44c7d2f9baa2103d55aa6a01e5076431ddd39d0336a49057b5f2ce07ddf9c9
BLAKE2b-256 checksum
How to use checksums
ab445425870b54f6cbe34adb5d982da4bca8ee4e3da9272ab45b46b544243f7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release files / xtce_lib-0.1.0a3-py3-none-any.whl

Download URL xtce_lib-0.1.0a3-py3-none-any.whl
Size 448.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d84801915d919943729f004a8630f3c33767e2e7bd56c39e28ec862bcd63c7b5
BLAKE2b-256 checksum
How to use checksums
efa7dc076f690345dcddb4fdc91370f822420d7ed97ce3f2a42f620d6f3267c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Security for xtce-lib 0.1.0a3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for xtce_lib-0.1.0a3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page