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 documents.
  • 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
  • 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.0a1

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.0a1
File Size Uploaded Provenance Actions
xtce_lib-0.1.0a1.tar.gz 520.8 kB With provenance Details for xtce_lib-0.1.0a1.tar.gz

Built distribution (wheel)

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

Total release size: 967.5 kB

Release files / xtce_lib-0.1.0a1.tar.gz

Download URL xtce_lib-0.1.0a1.tar.gz
Size 520.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ad185dda109dd5cb81447ce4dae840eb8864877b3dce46b8a85d9def25453db8
BLAKE2b-256 checksum
How to use checksums
08ccf82a232db446cda61a28f9b1073563ee711e245d4b29e0c95007e19380c4
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 Aug 30, 2026.

Transparency log

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

Download URL xtce_lib-0.1.0a1-py3-none-any.whl
Size 446.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9eae854503a3cf4bbb043236a4724a2523624a34a921711d8879d1da6f57c3d
BLAKE2b-256 checksum
How to use checksums
e2c46bb8d7ccda9c08ca99b326f09401fcd51d08bc7934857546193cec6c019f
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 Aug 30, 2026.

Transparency log

Security for xtce-lib 0.1.0a1

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.0a1.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 Aug 30, 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