Skip to main content

CRML reference engine (simulation/runtime)

Project description

crml-engine

Reference runtime/simulation engine for CRML.

Depends on crml-lang for the CRML models and validation.

Install

pip install crml-engine

CLI

Validate a scenario/portfolio document:

crml-lang validate examples/scenarios/data-breach-simple.yaml
crml-lang validate examples/portfolios/portfolio.yaml

Run a simulation:

crml simulate examples/scenarios/data-breach-simple.yaml --runs 10000
crml simulate examples/portfolios/portfolio.yaml --runs 10000
crml simulate examples/portfolio_bundles/portfolio-bundle-documented.yaml --runs 10000

Notes:

  • The crml simulate command auto-detects scenario vs portfolio vs portfolio-bundle inputs.
  • Portfolio simulation uses crml_lang.plan_portfolio and applies portfolio semantics.

Python

from crml_engine.runtime import run_simulation

result = run_simulation("examples/scenarios/data-breach-simple.yaml", n_runs=10000)
print(result.metrics.eal)

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

crml_engine-1.2.0.tar.gz (41.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crml_engine-1.2.0-py3-none-any.whl (47.6 kB view details)

Uploaded Python 3

File details

Details for the file crml_engine-1.2.0.tar.gz.

File metadata

  • Download URL: crml_engine-1.2.0.tar.gz
  • Upload date:
  • Size: 41.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for crml_engine-1.2.0.tar.gz
Algorithm Hash digest
SHA256 bbd45336b99dcb8245f85c9a0d10007eb1d9da40d6ba7dc1f9918ce8649dd422
MD5 e0fd3e793e6454976199730eb26f053d
BLAKE2b-256 32cf99b9e878b0bbdd36094907009252d499eec03c218ab7ee8df4cbbf943a91

See more details on using hashes here.

File details

Details for the file crml_engine-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: crml_engine-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 47.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for crml_engine-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14b2090fc111a73166b7ca08889b861d151c7c38dc2c49074c1554467edf49b6
MD5 35e81e5b6fdabb21b9747f370d5fbf38
BLAKE2b-256 d92f806e46ffdec1c3ab2489de4e396bec74f3ce750d49e96dba06c1d6a6ae7f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page