Skip to main content

mat-data-handler – Organizing Material Data for Crystal Plasticity

Plain Python package to validate, combine, and export crystal-plasticity material parameter sets. The material data itself (YAML entries, JSON schemas, PROPS mapping table) is retrieved from the mat-data repository and fetched over the network (and cached locally) at runtime.
Currently only support for the crystal plasticity model ICAMS CP-UMAT is provided. Use the mat_extract_params command to extract the require .inc files that contains the values for PROPS[9:] read by the ICAMS CP-UMAT.

Installation

pip install mat-data-handler

First use of the CLI/API fetches the pinned mat-data ref (default: main) and caches it under ~/.cache/mat-data-handler. For offline use or local development against a sibling checkout, set:

export MAT_DATA_LOCAL_PATH=/path/to/mat-data   # skips network access entirely

Other environment variables: MAT_DATA_REPO (default ICAMS/mat-data), MAT_DATA_REF (default main; pin to a release tag for reproducibility), MAT_DATA_FETCH_METHOD (http default, stdlib-only tarball download; or git, which shells out to the git binary), MAT_DATA_CACHE_DIR.

API

  • mat_data_handler.data_source.{entries_dir, schemas_dir, mapping_path}() — resolve (fetching/caching as needed) local paths to the mat-data content.
  • mat_data_handler.database.build_database(entries, schemas, output_format="yaml") — validate all entries and return the combined database as text.
  • mat_data_handler.database.validate_only(entries, schemas) — validate only, returns the number of valid materials.
  • mat_data_handler.extract.export_entry(entry, mapping, schemas) — export one loaded material entry to Abaqus PROPS records.
  • mat_data_handler.extract.load_document(path) / parse_mapping(path) — helpers to load a YAML/JSON entry or the mapping.csv table.

CLI

mat-build-database --output build/materials.yaml  # generate combined database
mat-extract-params copper_generic --outdir build/includes
mat-extract-params all --outdir build/includes

Both commands default to fetching data from mat-data; pass --entries/--schemas/--mapping-file to point at a different data source (e.g. a local checkout) directly.

Contributing

See CONTRIBUTING.md. For adding/updating material data, see mat-data instead — this repo has no data to edit.

Development

pip install -e ".[test]"
export MAT_DATA_LOCAL_PATH=../mat-data   # or wherever your mat-data checkout lives
pytest

License

MIT — see LICENSE. (Material data in mat-data is licensed separately, under CC-BY-4.0.)

Metadata

Release files for mat-data-handler 0.1.0

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

Source distribution (sdist)

Source distribution for mat-data-handler 0.1.0
File Size Uploaded
mat_data_handler-0.1.0.tar.gz 14.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mat-data-handler 0.1.0
File Interpreter ABI Platform
mat_data_handler-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.4 kB

Release files / mat_data_handler-0.1.0.tar.gz

Download URL mat_data_handler-0.1.0.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
53ecbcd58f58ec54f566102595e732346be1b61e7fae0a4ee2ab93ec341ef3bb
BLAKE2b-256 checksum
How to use checksums
cfb37680404716129c8b8eef3d4820b3a2b4d73760310bb2b10077c2fb39b65d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release files / mat_data_handler-0.1.0-py3-none-any.whl

Download URL mat_data_handler-0.1.0-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
101a39b6d4df4d6258664ee4bdd9818b43b553c82a9b5753dfed63b8070f4d43
BLAKE2b-256 checksum
How to use checksums
6dce4dfb3c884e9fcd49f732271a971e1f2a45f02029652555d1a1bfdde107bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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