Skip to main content

pyxtuml is a python library for parsing, manipulating, and generating BridgePoint xtUML models.

1 Dependencies

For people running Ubuntu, all dependencies are available via apt-get:

$ sudo apt-get install python2.7 python-ply

pyxtuml also works with python3 and pypy.

2 Installation

Install from pypi:

$ python -m pip install pyxtuml

Or fetch the source from github:

$ git clone https://github.com/xtuml/pyxtuml.git
$ cd pyxtuml
$ python setup.py install

Optionally, you can also execute a test suite:

$ python setup.py test

3 Usage example

The examples folder contains a few scripts which demonstrate how pyxtuml may be used.

The following command will create an empty metamodel and populate it with some sample data:

$ python examples/create_external_entity.py > test.sql

Copy the SQL statements saved in test.sql to your clipboard, and paste them into the BridgePoint editor with a project selected in the project explorer.

If you are on a more recent GNU/Linux system, you can also pipe the output directly to your clipboard without bouncing via disk:

$ python examples/create_external_entity.py | xclip -selection clipboard

4 Command Line Tools

pyxtuml contain a few useful command line tools which are described below.

4.1 Check model for integrity violations

A model may be checked for association constraint violations. By default, all associations are checked. Optionally, the check may be limited to one or more associations by appending the -r argument for each association to check.

$ python -m xtuml.consistency_check [options] <sql_file> [another_sql_file...]

Using the above command, both the model and schema needs to be provided by the user. If the model is expressed in the bridgepoint meta model (ooaofooa), the following command may be used instead:

$ python -m bridgepoint.consistency_check [options] <model_path> [another_model_path...]

With this command, the user only have to provide the model (the models folder containing all .xtuml files).

Available options

--help, -h

show this help message and exit

--version

show program’s version number and exit

-r <number>

limit consistency check to one or more associations

-v

increase debug logging level

4.2 Generate a meta model schema

To create an sql schema from a bridgepoint model, the following command may be used:

$ python -m bridgepoint.gen_sql_schema [options] <model_path> [another_model_path...]

Available options

--help, -h

show this help message and exit

--version

show program’s version number and exit

-c NAME

export sql schema for the component named NAME

-o PATH

save sql schema to PATH (required)

-v

increase debug logging level

4.3 Generate an xsd schema

To create an xsd schema for xml files, the following command may be used:

$ python -m bridgepoint.gen_xsd_schema [options] <model_path> [another_model_path...]

Available options

--help, -h

show this help message and exit

--version

show program’s version number and exit

-c NAME

export xsd schema for the component named NAME

-o PATH

save xsd schema to PATH (required)

-v

increase debug logging level

Note that the schema is compatible with Microsoft Excel. Consequently, Excel may be used to define instances in a model that can be easily exported to xml files.

4.4 Object Action Language Prebuilder

Generally, all model compilers takes as input an sql where all OAL actions has been translated from its textual representation into instances in the ooaofooa meta model. This translation is usually conducted by the Eclipse- based prebuilder included with the BridgePoint IDE. pyxtuml contains an independent prebuilder, implemented in python (and thus may be somewhat slower). The pyxtuml prebuilder may be invoked using the folling command:

$ python -m bridgepoint.prebuild [options] <model_path> [another_model_path..]

Available options

--help, -h

show this help message and exit

--version

show program’s version number and exit¨

-o PATH

set output to PATH

-v

increase debug logging level

5 Reporting bugs

If you encounter problems with pyxtuml, please file a github issue. If you plan on sending pull request which affect more than a few lines of code, please file an issue before you start to work on you changes. This will allow us to discuss the solution properly before you commit time and effort.

6 License

pyxtuml is licensed under the GPLv3, see LICENSE for more information.

Release files for pyxtuml 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyxtuml 0.8.1
File Size Uploaded
pyxtuml-0.8.1.tar.gz 70.6 kB Details

Release files / pyxtuml-0.8.1.tar.gz

Download URL pyxtuml-0.8.1.tar.gz
Size 70.6 kB
Tags Source
SHA-256 checksum
How to use checksums
506d417fec5dc197d80cdfe781b54d74fb4b65ff1bbeaf82c6b86e515c798889
BLAKE2b-256 checksum
How to use checksums
d4f51ac6b1529669d3f794c6a909edb201d29c7c0d887f344a4364fa2f86d970
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

3.0.0

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.2

2 release files

2.2.1

1 release file

2.2.0

1 release file

2.1.0

1 release file

2.0.0

1 release file

1.0.0

1 release file

0.9.9

1 release file

0.9.4

1 release file

0.9.3

1 release file

0.9.0

1 release file

0.8.3

1 release file

0.8.2

1 release file

This release

0.8.1 This release

1 release file

0.8.0

1 release file

0.7.11

1 release file

0.7.10

1 release file

0.7.8

1 release file

0.7.7

1 release file

0.7.6

1 release file

0.7.5

1 release file

0.7.4

1 release file

0.7.3

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.0

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page