Skip to main content

A virtual stack machine that executes Python code based on instructions provided in a JSON file.

Project description

Collagen

Note: This documentation is a work in progress.

Collagen is a virtual stack machine that lets you write procedures in configuration files, like JSON or YAML, that generate outputs like data, images, or documents. A procedure defines a sequence of operations that run in the Python environment, and the operations in a procedure pass data to each other by pushing, popping, and swapping data on the stack. The standard toolkit (built-in) defines a turning complete set of operations that provide the backbone for scripting logic in your procedures. You can add methods with new functionality by adding toolkits, which add methods by implementing Python functions with the new functionality and using the @cvm.method decorator.

Installation

You can install collagen via pip. Note that the basic installation only supports JSON procedures.

pip install collagen

Procedures written in JSON5, HSON, or YAML can have comments and multi-line strings. You can install support for additional configuration file formats via extra requirements.

pip install collagen[json5,hson]

If you're developing a collagen toolkit, include the dev and docs extra requirements.

pip install "collagen[dev,docs]"

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

collagen-0.2.0.tar.gz (34.6 kB view hashes)

Uploaded Source

Built Distribution

collagen-0.2.0-py3-none-any.whl (20.8 kB view hashes)

Uploaded Python 3

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