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.0a4

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

Built distribution (wheel)

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

Total release size: 970.8 kB

Release files / xtce_lib-0.1.0a4.tar.gz

Download URL xtce_lib-0.1.0a4.tar.gz
Size 522.4 kB
Tags Source
SHA-256 checksum
How to use checksums
49caf27e5c46655af944b44f199515e827245c84841cf067c060e79d6f3cbf79
BLAKE2b-256 checksum
How to use checksums
39d38d8a301c629c8f6f445af7c15f3cf9b64fa25b69312be5bae6d868ffc9e2
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 3, 2026.

Transparency log

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

Download URL xtce_lib-0.1.0a4-py3-none-any.whl
Size 448.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
319057a3cf5ae200ef7f2b71d475770b5b84156590ab1e3b1d00a5a277f8944c
BLAKE2b-256 checksum
How to use checksums
d5e95d33148592ea183c9bb5ee78a5d0c3871e8bbc6e1a436cb1e3ed78d655bd
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 3, 2026.

Transparency log

Security for xtce-lib 0.1.0a4

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.0a4.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 3, 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