Skip to main content

Contributors Forks Stargazers Issues MIT License


Logo

TMDLParser

A Python library designed to parse and process TMDL (Table Metadata Description Language) files

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

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.

(back to top)

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).

(back to top)

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Project Link: https://github.com/Atzingen/tmdl-parser

gustavo.von.atzingen@gmail.com

(back to top)

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)

Source distribution for tmdl-parser 0.2.0
File Size Uploaded
tmdl_parser-0.2.0.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tmdl-parser 0.2.0
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

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