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.7.tar.gz (13.5 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.7-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cml_parser-0.1.7.tar.gz
  • Upload date:
  • Size: 13.5 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.7.tar.gz
Algorithm Hash digest
SHA256 884263500db4d8e771080e5d093ac163ccbb5d1b220aef668eccc03e02d52214
MD5 1cb4cb5dfe07014581368556e12c4924
BLAKE2b-256 594ff358a977de7cfe504a612091e4641daf40e3bbcfb1cb6bb8af02c3e8d4ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cml_parser-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 13.2 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 1359ab364eeb2250367d002d50ab4ef3b722669c8515ab5a0775dba3b66dd5b2
MD5 9ec3a83bfc89ccc02fd91193af1ef42c
BLAKE2b-256 126faa3edb13f914d2024770e45d11a1b89dc5b1ad8fd30f9c63d74a3df2539f

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