Skip to main content
Pre-release

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

XMAS-Core

coverage report pipeline status Latest Release

Documentation | Repository

The XLeitstelle Model-driven Application Schema (XMAS) Core represents appschemas as Pydantic models and is meant as a library for other applications to build on; the xmas CLI exposes the same operations on the command line.

Supported appschemas:

  • XPlanung 4.1, 5.4, 6.0, 6.1
  • XTrasse 2.0, 2.1
  • XWärmeplan 0.9

Every schema version is generated from it into a Pydantic module that also records each class's and property's UML metadata: stereotype, type name, unit of measure and association ends. Everything else is driven by that metadata, not by per-class code. The GML and JSON-FG codecs encode and decode any class generically. The database stores every schema in one generic table, and the navigable roles it follows are derived from the associations. Migration and style rules are checked against the schemas when they load, and are published with a JSON Schema each, see rule files. A new schema version starts as generated code, not hand-written classes.

Features

  • Reading and writing GML and JSON-FG, from files, stdin, URLs or a WFS.
  • Storing plans in PostgreSQL/PostGIS, with Alembic-managed schemas and several tenant schemas served from one process.
  • Migrating XPlanung documents to a later version, several hops in one call, with a per-feature report of what could not be carried over.
  • Adding style properties (stylesheetId, schriftinhalt) to XPlanung presentational objects based on defined rules.

Installation

From PyPI (Python 3.14):

pip install xmas-core

GDAL and its Python bindings are required; the GDAL system library and Python package versions must match.

With Pixi, which brings GDAL along:

git clone https://gitlab.opencode.de/xleitstelle/xmas-core.git
cd xmas-core
pixi install -e prod

As a container: images are in the container registry (see usage).

Quickstart

xmas convert input.gml output.json                        # GML -> JSON-FG
xmas convert xplan41.gml xplan61.gml --to 6.1 --report issues.json
xmas db create-schema postgresql://user@host/db
xmas convert input.gml postgresql://user@host/db          # GML -> PostGIS

From Python:

from xmas_core import codec
from xmas_core.processing.migration import migrate

collection = codec.read("xplan41.gml")
result = migrate(collection, "6.1")

More in the how-to guides.

Development

With Pixi installed:

git clone https://gitlab.opencode.de/xleitstelle/xmas-core.git
cd xmas-core
pixi run dev                              # environment + pre-commit hooks
pixi run test                             # full suite with coverage
pixi run test tests/path.py::test_name    # one test
pixi run test -m db                       # by marker (see pyproject.toml)
pixi run docs-serve                       # documentation preview

DB tests start their own PostGIS container (podman or Docker).

The design is documented in the module docstrings; for architecture and workflows see the Developer Guide.

License

The code in this repository is licensed under the EUPL-1.2+

© XLeitstelle, 2025-2026

Metadata

Release files for xmas-core 2.0.0rc11

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

Source distribution (sdist)

Source distribution for xmas-core 2.0.0rc11
File Size Uploaded Provenance
xmas_core-2.0.0rc11.tar.gz 773.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for xmas-core 2.0.0rc11
File Interpreter ABI Platform
xmas_core-2.0.0rc11-py3-none-any.whl Python 3 none any Details

Total release size: 1.6 MB

Release files / xmas_core-2.0.0rc11.tar.gz

Download URL xmas_core-2.0.0rc11.tar.gz
Size 773.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3c993d0b1b3dd7984eae7e56652df991d20cba28497c58c7ea8a17753e76c111
BLAKE2b-256 checksum
How to use checksums
bab9a7cd61deafd0a525087839dc756ff6b8c23687c9bd19195f0aea36d6196d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / xmas_core-2.0.0rc11-py3-none-any.whl

Download URL xmas_core-2.0.0rc11-py3-none-any.whl
Size 823.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39dd05268850c3a84978669cfb05a9887e4c8bfb81c9fbe239c1fdd0a42e4699
BLAKE2b-256 checksum
How to use checksums
8ee1c12f680abcf8c501b30619c6dc4c6ee7e42fb27ddffe5dfb382d8cad7957
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for xmas-core 2.0.0rc11

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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