TMDLParser
A Python library designed to parse and process TMDL (Table Metadata Description Language) files
Table of Contents
About The Project
TMDLParser is a Python library designed to parse and process TMDL (Table Metadata Description Language) files. It provides a structured way to handle data descriptions, properties, and calculations with an easy-to-use API.
- Parses TMDL files into structured Python objects.
- Handles multiple levels of nested properties.
- Supports detailed descriptions, elements, properties, and calculations.
- Easily integrates with other Python applications.
- Lightweight and easy to install.
Getting Started
Install the library directly from PyPI:
pip install tmdl-parser
Prerequisites
python>=3.10 Library uses only standart library and no 3th party.
Usage
Basic Example
from tmdlparser import TMLDParser
# Initialize the parser with a TMDL file path
parser = TMLDParser("path/to/tmdl/file.tmdl")
# Print the parsed structure
print(parser)
Results:
Description: Table Description
Element: Table Name
Properties:
----------
Description: Column Description
Element: Column Name
Props: ['property_1', 'property_2']
Calcs: ['calculation_1']
Calculation: ['Calculation Formula']
--------------------
Export formats
The parser can also return the parsed structure as a plain Python dictionary
or as a pandas DataFrame for downstream analysis:
from tmdlparser import TMLDParser
parser = TMLDParser("path/to/project.pbip")
parser.parse_all_tables()
# Nested dict, ready for json.dumps() or any downstream processing.
data = parser.to_dict()
# Flat DataFrame (one row per TMDL entry, nested entries get parent_element set).
df = parser.to_dataframe()
# Or keep only the top-level entries with raw properties:
df_top = parser.to_dataframe(flatten=False)
to_dataframe() requires pandas, which is an optional dependency. Install it
with:
pip install tmdl-parser[pandas]
Roadmap
- Publish to pip
- Create tests
- Better return format for parsed files
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.txt for more information.
Contact
Project Link: https://github.com/Atzingen/tmdl-parser
Metadata
Release files for tmdl-parser 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tmdl_parser-0.2.0.tar.gz | 8.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tmdl_parser-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.9 kB
Release files / tmdl_parser-0.2.0.tar.gz
| Download URL | tmdl_parser-0.2.0.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e8867dcc563860671ddf4f578951e5c67a9997c12e9db1f334286c00e2167dd5
|
|
BLAKE2b-256 checksum How to use checksums |
3c5525a9681eaf5ec3ec4a22c0a310cbe369af9cadbbb503d419054712b71649
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 15, 2026.
Transparency logRelease files / tmdl_parser-0.2.0-py3-none-any.whl
| Download URL | tmdl_parser-0.2.0-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c1e1f2896e79d3048c3469c2cbcb75cdf7b1aae7c473f2caff820b575aa7144
|
|
BLAKE2b-256 checksum How to use checksums |
a556f86d0078f35e46bf9a68377a331076d5ca505fe5918321ccbbb4e6a74c7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 15, 2026.
Transparency log