Skip to main content

npm version License: Apache

mode

MOdel DEfinitions in JS/TS/Py - houses entity definitions for:

Installation

For usage within a JavaScript project:

npm install @mat3ra/mode

For development:

git clone https://github.com/mat3ra/mode.git

Contribution

This repository is an open-source work-in-progress and we welcome contributions.

We regularly deploy the latest code containing all accepted contributions online as part of the Mat3ra.com platform, so contributors will see their code in action there.

See ESSE for additional context regarding the data schemas used here.

Useful commands for development:

# run linter without persistence
npm run lint

# run linter and save edits
npm run lint:fix

# compile the library
npm run transpile

# run tests
npm run test

How to Add New Models and Methods

!NOTE: this section is moved to @mat3ra/standata.

The list of model and method entities is compiled from Yaml assets located in the ./assets directory using the build_entities.js script. The assets processed by this script usually involve custom Yaml types such as !combine to generate several entity configurations at once.

A new model or method may be added either by extending parameters of an existing entity or by adding a new asset file such as the following:

!combine
name:
  template: 'Model{{ "-" + parameters.example }}' # set the model name using a template

# Loop over parameters to create combinations
forEach:
  - !parameter
    key: parameters.example # path of where to set the property
    values: ["A", "B", "C"] # values to iterate over
    isOptional: true

# static configuration (same for all created entities
config:
  tags:
    - example_model
    - tutorial
  schema: !esse 'schema-id-placeholder' # add a schema using the !esse type to validate each configuration

The above asset file will create four model configurations, "Model-A", "Model-B", "Model-C", and "Model". The latter entity is created due to the isOptional flag of the example parameter. There are a few more options available to customize the entity asset, for instance, the !combine type has an exclusions property where conflicting pairs of entity properties can be defined, so that combinations of those will be avoided.

For more examples, please see the asset files in ./assets or code.js for the definition of Yaml types such as !combine or !parameter.

Metadata

Release files for mat3ra-mode 2026.11.25.post1

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

Source distribution (sdist)

Source distribution for mat3ra-mode 2026.11.25.post1
File Size Uploaded Provenance Actions
mat3ra_mode-2026.11.25.post1.tar.gz 133.0 kB Without provenance Details for mat3ra_mode-2026.11.25.post1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mat3ra-mode 2026.11.25.post1
File Interpreter ABI Platform Actions
mat3ra_mode-2026.11.25.post1-py3-none-any.whl Python 3 none any Details for mat3ra_mode-2026.11.25.post1-py3-none-any.whl

Total release size: 141.1 kB

Release files / mat3ra_mode-2026.11.25.post1.tar.gz

Download URL mat3ra_mode-2026.11.25.post1.tar.gz
Size 133.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b3d047c49e78b8409dd1a1c72bc3ccfff726b0b41469777bccb42ed0ba342795
BLAKE2b-256 checksum
How to use checksums
fbb839c580735d12ebb56ccd49e8ceac0b274f7b6775937691e460b1fea0f5e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/9.0.1 pkginfo/1.13.3 requests/2.34.2 requests-toolbelt/1.0.0 tqdm/4.70.1 CPython/3.10.13

Release files / mat3ra_mode-2026.11.25.post1-py3-none-any.whl

Download URL mat3ra_mode-2026.11.25.post1-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a4cf1cba7dcbdf0d67136e8fd2c25c91bf1176480cc8e073c96d11b16c94b9f
BLAKE2b-256 checksum
How to use checksums
f0cefd4532fbaefa4eb629e0786b9f5f8f1816491c6a1e06ee19f0073e957568
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/9.0.1 pkginfo/1.13.3 requests/2.34.2 requests-toolbelt/1.0.0 tqdm/4.70.1 CPython/3.10.13

Security for mat3ra-mode 2026.11.25.post1

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