Quick Start Guide to Modelspec

This is a quick guide to the various parts of the modelspec module and examples.

Installation of Python API

Use pip to install the latest version of modelspec (plus dependencies) from PyPI:

pip install modelspec

More details, and importantly, how to set up a virtual environment for the package, can be found here.

Examples of Modelspec

Simple example

A basic example which illustrates how to create the specification for a document (i.e. the model definition for a document) and create serialized instances can be found here.

Serialization formats

Python scripts can be used to generate the specification of a type of model (e.g. this), but the models are saved in standardized format in either text based (JSON or YAML) formats or in binary (BSON) format. Support for XML serialization has recently been added.

Current formats using modelspec

MDF (Model Description Format)

ModECI’s MDF uses modelspec to create the structure of its models and convert the models into serialized formats such as JSON, YAML, and BSON.

NeuroML

NeuroMLlite uses modelspec to create the structure of its models and convert the models into serialize formats such as JSON, YAML, and BSON. The XML serialisation of modelspec will be useful for integrating NeuroML 2 files into the framework, see here.