Skip to main content

MiCADO Parser

The MiCADO component responsible for parsing and validating ADTs

Historically part of the MiCADO TOSCASubmitter, now a standalone library and command-line tool used inside MiCADO and on its own for validating single-file (YAML) and multi-file (CSAR) ADTs.

Dependencies

The MiCADO Parser uses the following packages:

Installation

Install the latest version of the MiCADO Parser from PyPI.

pip install micado-parser

or from GitHub.

git clone https://github.com/micado-scale/micado-parser
pip install micado-parser/.

Usage

Command-line

For some helpful tips, use the --help option

micadoparser --help

To validate an ADT, simply point at an ADT.

micadoparser /home/ubuntu/adts/nginx.yaml

Multi-file ADTs in .csar format are also supported

micadoparser /home/ubuntu/adts/wordpress.csar

The tool can handle multiple files.

micadoparser ~/adts/nginx.yaml ~/adts/wordpress.csar

Or an entire directory.

micadoparser ~/adts/*

For verbose output use the -v option (for even more verbosity use -vv or -vvv).

micadoparser -v ~/adts/nginx.yaml

Library

The primary function of the MiCADO Parser is to return a validated ToscaTemplate object.

To use it in your own project, simply import the set_template function and pass it the path to your ADT. You can optionally pass a dictionary of TOSCA inputs, if inputs are defined in your ADT.

from micadoparser import set_template

tpl = set_template("/home/ubuntu/adts/nginx.yaml")

tpl_with_params = set_template(
    "home/ubuntu/adts/wordpress.csar",
    {"username": "jay", "token": "ABD992LOKAL"}
)

To use the package for validation only, use the set_template function and catch the MultiError exception.

from micadoparser import set_template, MultiError

try:
    set_template("/home/ubuntu/adts/nginx.yaml")
except MultiError as e:
    print(e)

Comparison with the OpenStack TOSCA Parser

The MiCADO Parser adds a few features compared to the upstream TOSCA Parser.

  • MiCADO-specific validations
  • MiCADO-specific CSAR handling
  • Input resolution
  • Support for some TOSCA v1.3 features

Metadata

Release files for micado-parser 0.12.3

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

Source distribution (sdist)

Source distribution for micado-parser 0.12.3
File Size Uploaded Provenance Actions
micado-parser-0.12.3.tar.gz 16.1 kB Without provenance Details for micado-parser-0.12.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for micado-parser 0.12.3
File Interpreter ABI Platform Actions
micado_parser-0.12.3-py3-none-any.whl Python 3 none any Details for micado_parser-0.12.3-py3-none-any.whl

Total release size: 34.5 kB

Release files / micado-parser-0.12.3.tar.gz

Download URL micado-parser-0.12.3.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
da6a5d5e1147c6204e1d37ad3a587a675289dfa147ae6c642572022aeef420f6
BLAKE2b-256 checksum
How to use checksums
1347cc98fbac0ef0ce8b46448b8c7137162a6f722dcb7c425d95646064cc6dae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / micado_parser-0.12.3-py3-none-any.whl

Download URL micado_parser-0.12.3-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e9f888dcbeaa3acea7d6deb7abde003956b7ab36f5dd1395a3698883ff26aaa
BLAKE2b-256 checksum
How to use checksums
fa6452d2d042fa745c610d1dfd16eb98b078744518268e3002bf4ef60bb94c3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Security for micado-parser 0.12.3

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.

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