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

Uploaded Python 3

File details

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

File metadata

  • Download URL: cml_parser-0.1.5.tar.gz
  • Upload date:
  • Size: 7.2 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.5.tar.gz
Algorithm Hash digest
SHA256 5fe66242800948b974bf888c4fa767d94e74ce939abd605aa786398861a4765f
MD5 37bd7451da7a44d5a8c158408b35d792
BLAKE2b-256 e74c778dfe82551c6a663ed40ab2b5f154d1d810856546c76467ba9540eafa42

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cml_parser-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 7.4 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 11edd66c97d19041da5694cc7c7a1de0e75d0a9c761d1f517b77e230b78a2c2e
MD5 b8440bb7f77bd697c19ed582084ad5fc
BLAKE2b-256 779160c6fad2e6cf15f0841049c59a03d0aa14dd7cc2947d6552e3a87ac9afd0

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