Skip to main content

Model editor

Project description

Flatland Model Diagram Editor

Flatland is a model diagram editor written by myself Leon Starr that generates beautiful PDFs (and other output formats) based on two very human-readable input text files. The model file specifies model semantics (state transitions, generalizations, classes etc) while the layout file specifies (node placement and alignment, connector anchors) and lightly refers to some elements in the model file. You can think of the layout file as a "style sheet" for your models. Some benefits:

  • You can now put your models under configuration management since the source is all text.
  • Complex model layouts are easily edited without the need for tedious pixel pushing in a graphical editor
  • Executable UML (xUML) in particular is supported, but any similar kind of model diagrams can be supported with minor extensions

WARNING: I am in the process of figuring out PyPI for the first time, so it's going to be a few weeks before this tool is ready to use. I don't recommend wasting your time downloading just yet. Follow me on twitter or LinkedIn for updates. I do have a nice alpha version working that makes awesome class diagrams in my cozy PyCharm environment, but it turns out that multi-platform deployment is a pain in the ass. Who knew? ;)

Shameless plug

In the meantime, if you are curious about the whole MBSE thing that this tool supports, take a look at our book. Also, various resources at the Model Integration website.

Installation

You can install the Real Python Feed Reader from PyPI:

pip install flatland-model-editor

The editor is supported on Python 3.7 and above

How to use

Assuming you have two files, my_model.xmm (xmm = Executable Model Markdown) and my_layout.xss (xss = Executable model Style Sheet),

$ flatland -m my_model.xmm -l my_layout.xss -d my_beautiful_diagram.pdf

Or the model can be standard input and the diagram can go to standard output:

$ my_model.xmm > flatland -l my_layout.xss > my_beautiful_diagram.pdf

Model and layout files

Initially I will be supplying a grammar/parser for specifying model layouts. It knows all about nodes, connectors of various types and uses a system for placement of nodes and connector anchors that doesn't require you to know anything about pixels or points. We use an agile system of relative placement that is extremely awesome!

The grammar is a PEG grammar defined using the arpeggio python package.

The model grammar/parser, also provided, is specifically for xUML model semantics. If you have some other modeling language that you want to draw, no worries. You can use the template to create your own grammar. You will need to get comfortable with arpeggio and PEG grammars, but you're a smart engineer and I know you can do it!

Schedule

I will be futzing around with PyPI, manifests, documentation, relative imports and so forth into early February 2021, so a version you can actually use to do something useful probably won't be available until then.

Expect this to be in serious beta by late spring 2021. I would like it to be sooner, but I have a day job.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

flatland-model-diagram-editor-0.1.5.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file flatland-model-diagram-editor-0.1.5.tar.gz.

File metadata

  • Download URL: flatland-model-diagram-editor-0.1.5.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.0

File hashes

Hashes for flatland-model-diagram-editor-0.1.5.tar.gz
Algorithm Hash digest
SHA256 5ef5d7bdb3f0f450631ea5fb881a8984a23d5b1ca299d3c328ec077b63780d12
MD5 a755ec6d8455f83bac285fdf6c1ba3af
BLAKE2b-256 fdefeadb6f2c49edac291d5ce1cf02f3260dcb1c68c4fd8cd9d54862302025a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flatland_model_diagram_editor-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.0

File hashes

Hashes for flatland_model_diagram_editor-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a96cd80ff7ac86a8c97a2c4dc227be867a86d198cf8d623ff299448a2e3c1fec
MD5 29ac46ba5964f3190a5949d2802e3008
BLAKE2b-256 83119c14f0bab521b79cdaa0b07823e82de4796dc3ebb0b1e3ea05261423e7b5

See more details on using hashes here.

Supported by

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