Skip to main content

A Python parser for Context Mapper DSL (CML)

Project description

CML Parser

CI PyPI codecov Python License

CML Parser

A Python library to parse the Context Mapper Language (CML) using textX. It aims to cover the language defined by the Context Mapper project and is validated against the official sample models.

Context

CML is the DSL for Context Mapper, a toolkit for strategic/tactical Domain-Driven Design modeling. Reference material and canonical examples are maintained by the Context Mapper team:

Installation

pip install cml-parser

Usage

from cml_parser import parse_file

model = parse_file("path/to/model.cml")

# On success, model is a textX object graph you can traverse.
print(model)
# If you prefer a non-raising flow:
# from cml_parser import parse_file_safe
# result = parse_file_safe("path/to/model.cml")
# if result.error:
#     print("Parsing failed:", result.error)

Development

git clone https://github.com/martin882003/cml_parser.git
cd cml_parser
python -m venv venv
source venv/bin/activate
pip install -e .
pytest

License

MIT License — see LICENSE.

Contact

Contributing

Contributions are welcome! Please:

  1. Open an issue describing the change (grammar gaps, bugs, docs).
  2. Keep coverage: ensure pytest passes and new constructs are represented in examples/ or new fixtures.
  3. Submit a PR with a concise summary of the change.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cml_parser-0.1.6.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cml_parser-0.1.6-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file cml_parser-0.1.6.tar.gz.

File metadata

  • Download URL: cml_parser-0.1.6.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cml_parser-0.1.6.tar.gz
Algorithm Hash digest
SHA256 7b0d53606bbd703809389125c3e763e760b7bc6e7028c98270c8996bcbf612cb
MD5 cb56187eef904c408c81392988737079
BLAKE2b-256 46f1c27dfbbde20011e22ad8bfce27dce4a1c3d472fcd40d777642e01b9507eb

See more details on using hashes here.

File details

Details for the file cml_parser-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: cml_parser-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cml_parser-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9043a5a1b9835c1125b6c1121a1182c0a7fa8487d3671ab37326e446db426754
MD5 7b4c13afd3410ff4adb9462ef5a08fb5
BLAKE2b-256 46ba7944a8152aad72ef303f793f052e71c81ef856a29e47a5bf391de7d8b887

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page