Skip to main content

ℹ If you’re looking for a wrapper around the new (2024) BDEW XMLs for MIG and AHB, checkout our fundamend repository. This maus package uses a different data format, because it’s older than 2024.

Unittests status badge Coverage status badge Linting status badge Black status badge pypy status badge read the docs
maus logo
This repository contains the Python package maus.
MAUS is an acronym for MIG AHB Utility Stack where MIG stands for Message Implementation Guide and AHB stands for Anwendungshandbuch.
The maus software/package allows matching single lines from the AHB with fields specified in the MIG.
This package is necessary because EDI@Energy does not provide any real technical and machine-readable description of the MIGs and AHBs, only PDFs.
MAUS can also be used as a data model (maus.model) , without using the software or logic included in the package (MIG/AHB matching logic).

We’re all hoping for the day of true digitization on which this repository will become obsolete.

What Problem Does It Solve?

Image you scraped the AHB PDFs into something machine-readable. Machine-readability in this context implies, that for each field/information inside the AHB you can easily access

  • segment group (e.g. “SG4”)

  • segment (e.g. “LOC”)

  • data element ID (e.g. “3225”)

  • AHB Expressions (e.g. “Muss [123] U ([456] O [789])[904]”)

The exact data format (be it CSV, JSON, XML …) is not important beyond an initial deserialization.

(BTW: The AHB Expression can be parsed and evaluated using the 🦅 AHBicht Library or our AHBicht REST API which is publicly available.)

Image you also had a machine-readable version of the MIG – spoiler: Hochfrequenz can help you with that (please contact @JoschaMetze for a demo) – you still weren’t able to make use of your data because the MIG data and AHB data are still unrelated. MAUS creates a connection between machine readable AHBs and machine readable MIGs. This allows to associate certain lines from the AHB with certain fields in the MIG and is the basis for a meaningful content evaluation/validation of EDIFACT messages, or, to be more precise, validation of data structures that might be converted to EDIFACT.

Code Quality / Production Readiness

  • The code has at least a 95% unit test coverage. ✔️

  • The code is rated 10/10 in pylint and type checked with mypy (PEP 561). ✔️

  • The code is MIT licensed. ✔️

  • There are only few dependencies. ✔️

Installation

For the bare maus data model and matching logic it’s sufficient to install pip install maus. Only if the MIG you’re using is based on XML (namely the Hochfrequenz XML based MIG representation), you need to install pip install maus[xml]. If you want to use the CLI tool, you need to install pip install maus[cli].

Once installed you can either use the package and its data model in your own Python code or use the mapping logic (of only the Hochfrequenz EDIFACT XML templates as of now) via CLI: maus --flat_ahb_path flat_ahb_by_kohlrahbi.ahb.json --sgh_path path_to_segment_group_hierarchy.sgh.json --template_path UTILMD5.2e.template --output_path file_to_be_created.maus.json. The CLI tool is not only available via pip but also as standalone executable in the respective release assets.

Development

Please follow the detailed instructions in the README of our Python Template Repository on how to setup your local development environment (tl;dr: tox).

Contribute

You are very welcome to contribute to this template repository by opening a pull request against the main branch.

Release files for maus 0.6.1

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

Source distribution (sdist)

Source distribution for maus 0.6.1
File Size Uploaded
maus-0.6.1.tar.gz 86.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for maus 0.6.1
File Interpreter ABI Platform
maus-0.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 139.8 kB

Release files / maus-0.6.1.tar.gz

Download URL maus-0.6.1.tar.gz
Size 86.5 kB
Tags Source
SHA-256 checksum
How to use checksums
baaeb1611d6330f18d48f24f4abf71bbeed0df760d622775680122e2025304d8
BLAKE2b-256 checksum
How to use checksums
dff66aef020d5b44291668f741bbb0c402e932b95c752b54423c2f666db4cfc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Release files / maus-0.6.1-py3-none-any.whl

Download URL maus-0.6.1-py3-none-any.whl
Size 53.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
707914aaf31a4ebc6a943ef7c359d697656ba26df36110b451843891991939f4
BLAKE2b-256 checksum
How to use checksums
84d3fde9632d3df7e69fc82e25839646d1ee76568713fcb772fd72101efc322b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files

0.6.0

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.43

2 release files

0.3.42

2 release files

0.3.41

2 release files

0.3.40

2 release files

0.3.18

2 release files

0.3.17

2 release files

0.3.16

2 release files

0.3.15

2 release files

0.3.14

2 release files

0.3.13

2 release files

0.3.12

2 release files

0.3.11

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.23

2 release files

0.1.22

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.17

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.2

2 release files

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