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.4.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.4-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cml_parser-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 ea8c542544fb65b48609f14802914636031afe18a766ac6cbb05eab33e4d4ce8
MD5 0bc3250ff1592c3359105f7a82f33bd7
BLAKE2b-256 74c365ed9caafaabe8a24b87d952857f1a9e2cbf486d7e04f944d5ae510887ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cml_parser-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.3 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 085d60cf6f81b7f5c0c1654b254f5b61f41693f437d285418e71fd015e15e015
MD5 0a30946ac35d617b28ca7496b2c3546b
BLAKE2b-256 e7955a8292ef6c321bbb570f172cc449de0024053a5eb927a83a98262744ec23

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