Skip to main content

crml-lang

Language/spec package for CRML.

  • Pydantic models for CRML documents
  • Bundled JSON Schema + structured validator
  • YAML load/dump helpers (CRScenario, CRPortfolio)

Quickstart

Validate a scenario document:

from crml_lang import validate

report = validate("examples/scenarios/data-breach-simple.yaml", source_kind="path")
print(report.ok)

Load and work with typed models:

from crml_lang import CRScenario

scenario = CRScenario.load_from_yaml("examples/scenarios/data-breach-simple.yaml")
print(scenario.meta.name)

Bundle a portfolio (inline referenced scenarios/packs into a self-contained artifact):

from crml_lang import bundle_portfolio

report = bundle_portfolio("examples/portfolios/portfolio.yaml", source_kind="path")
print(report.ok)

bundle = report.bundle
assert bundle is not None

Bundle from in-memory models (no filesystem access required):

from crml_lang import CRPortfolio, CRScenario, bundle_portfolio

portfolio = CRPortfolio.load_from_yaml("examples/portfolios/portfolio.yaml")
scenario = CRScenario.load_from_yaml("examples/scenarios/data-breach-simple.yaml")

report = bundle_portfolio(
	portfolio,
	source_kind="model",
	scenarios={"s1": scenario},
)
print(report.ok)

Plan a portfolio (deterministic engine pipeline step):

from crml_engine.pipeline import plan_portfolio

plan = plan_portfolio("examples/portfolios/portfolio.yaml", source_kind="path")
print(plan.ok)

Metadata

Release files for crml-lang 1.2.1

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

Source distribution (sdist)

Source distribution for crml-lang 1.2.1
File Size Uploaded Provenance
crml_lang-1.2.1.tar.gz 86.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for crml-lang 1.2.1
File Interpreter ABI Platform
crml_lang-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 204.0 kB

Release files / crml_lang-1.2.1.tar.gz

Download URL crml_lang-1.2.1.tar.gz
Size 86.4 kB
Tags Source
SHA-256 checksum
How to use checksums
467de731ee5e7f35ed62e4bab1d1c179f841611b0cc26c1245b3faea5c6a0515
BLAKE2b-256 checksum
How to use checksums
5b6a161659d0822f7b784b65b9c29d07b052461a721b585119bcf0c5ebc5335b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / crml_lang-1.2.1-py3-none-any.whl

Download URL crml_lang-1.2.1-py3-none-any.whl
Size 117.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
212700a4d5ddbe14e5d25ca2f3c700f0e2dd90f14bd8d9dc689e12fc947744ac
BLAKE2b-256 checksum
How to use checksums
16509c4e35c80d92f8c084cd54a1dc6a18a4d054cec87b125aad8053da0996f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for crml-lang 1.2.1

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.

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