Skip to main content

Data Modelling CLI Tool PyPi version PyPi downloads Visitors

CLI tool for working with Data Modelling Storage Service

Installing

Install the tool via pip

$ pip3 install dm-cli

After a successful install, the program 'dm' will be available in your python environment

Usage

Usage: dm [OPTIONS] COMMAND [ARGS]...

Command Line Interface (CLI) tool for working with the Data Modelling Framework. This tool is mainly used to upload data source definitions, models and
entities, and creating RecipeLink-tables.

╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --force               -f            Force the operation. Overwriting and potentially deleting data.                                                         │
│ --url                 -u      TEXT  URL to the Data Modelling Storage Service (DMSS). [default: http://localhost:5000]                                      │
│ --token               -t      TEXT  Token for authentication against DMSS. [default: no-token]                                                              │
│ --debug               -d            Print stack trace of suppressed exceptions                                                                              │
│ --version             -v            Print version and exit                                                                                                  │
│ --install-completion                Install completion for the current shell.                                                                               │
│ --show-completion                   Show completion for the current shell, to copy it or customize the installation.                                        │
│ --help                              Show this message and exit.                                                                                             │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ create-lookup              Create a named Ui-/StorageRecipe-lookup-table from all RecipeLinks in a package existing in DMSS (requires admin privileges).    │
│ ds                         Import and reset data sources                                                                                                    │
│ entities                   Import, delete, or validate entities and/or blueprints                                                                           │
│ export                     Export one or more entities.                                                                                                     │
│ import-plugin-blueprints   Import blueprints from a plugin into the standard location 'system/Plugins/<plugin-name>'.                                       │
│ reset                      Reset all data sources (deletes and re-uploads all packages to DMSS).                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Required directory structure

Certain commands expect a specific directory structure, such as the commands dm reset, dm ds init, and dm ds reset. For these commands, the path argument must be the path to a directory with two subdirectories, data_sources and data.

$ tree app
app
├── data
  └── DemoApplicationDataSource
    ├── instances
│     └── demoApplication.json
|     └── models
|       └── DemoApplication.json
└── data_sources
    └── DemoApplicationDataSource.json

To add meta information to a package (for example to the models root package), a file with name "package.json" can be placed inside the folder.

Supported reference syntax

The CLI tool will understand and resolve the following address formats during import.

# URI - Full absolute path prefixed with protocol
dmss://datasource/package/entity
dmss://datasource/package/subfolder/entity
dmss://datasource/$123-456.attributeName

# Alias - Require dependencies to be defined somewhere in the source tree
ALIAS:package/entity
ALIAS:entity

# Data Source - Relative from the destination data source
/package/entity
/package/subfolder/entity
/$123-456.attributeName

# Package - Relative from the source package
entity
subfolder/entity

# Dotted - Relative from the file (UNIX directory traversal)
./../entity
../subfolder/entity
../../subfolder/entity

Development

$ python3 -m venv .venv
$ source .venv/bin/activate
# Install the package from local files in edit mode (-e)
$ pip3 install -e .
$ dm --help

Testing

  1. Install the dependencies: pip3 install -r requirements.txt
  2. Install the dev dependencies: pip3 install -r dev-requirements.txt
  3. Run the tests: pytest

Feedback

Please feel free to leave feedback in issues/PRs.

Contributing

If you would like to contribute, please read our Contribution guide.

Metadata

Release files for dm-cli 1.7.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 dm-cli 1.7.1
File Size Uploaded Provenance Actions
dm-cli-1.7.1.tar.gz 86.2 kB Without provenance Details for dm-cli-1.7.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dm-cli 1.7.1
File Interpreter ABI Platform Actions
dm_cli-1.7.1-py3-none-any.whl Python 3 none any Details for dm_cli-1.7.1-py3-none-any.whl

Total release size: 254.5 kB

Release files / dm-cli-1.7.1.tar.gz

Download URL dm-cli-1.7.1.tar.gz
Size 86.2 kB
Tags Source
SHA-256 checksum
How to use checksums
972f24c81021b026063648fa1dfd3082b2504bf7987f92dc28122c489575c50a
BLAKE2b-256 checksum
How to use checksums
4d82f426a5c0660891bfb0184d63e2b2bb15e15705326d0c25efa14e6162db40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Release files / dm_cli-1.7.1-py3-none-any.whl

Download URL dm_cli-1.7.1-py3-none-any.whl
Size 168.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c94003de89b70bcaf2dab806d0a35f7f21f3c91da507ae8a21ea6010d83b73e
BLAKE2b-256 checksum
How to use checksums
d1f21eded3d50d3052ba916988a84c5343bb63bd9d738dea5e7b42019a55ebd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Security for dm-cli 1.7.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.7.1 This release

2 release files No provenance

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