Skip to main content

Pythonic wrappers for the IMAS Access Layer

Project description

IMAS-Python

IMAS-Python (formerly known as IMASPy its for versions < 2) is a pure-python library to handle arbitrarily nested data structures. It is designed for, but not necessarily bound to, interacting with Interface Data Structures (IDSs) as defined by the Integrated Modelling & Analysis Suite (IMAS) Data Model.

Install

Simply install IMAS-Python with pip:

pip install imas-python

or with optional dependencies for netCDF and xarray support:

pip install imas-python[netcdf,xarray]

More details are described in the documentation generated from /docs/source/installing.rst. The documentation is autogenerated from the source using Sphinx and can be found at the readthedocs

To generate the documentation yourself, install the docs optional dependencies and do:

make -C docs html

How to use

import imas
factory = imas.IDSFactory()
equilibrium = factory.equilibrium()
print(equilibrium)

equilibrium.ids_properties.homogeneous_time = imas.ids_defs.IDS_TIME_MODE_HOMOGENEOUS
equilibrium.ids_properties.comment = "testing"
equilibrium.time = [0.01]

with imas.DBEntry("imas:hdf5?path=./testdb", "w") as dbentry:
    dbentry.put(equilibrium)
	
# or without imas_core dependency
with imas.DBEntry("./test.nc", "w") as dbentry:
    dbentry.put(equilibrium)

A quick 5 minutes introduction is available in the documentation generated from /docs/sources/intro.rst.

Legal

IMAS-Python is Copyright 2020-2025 ITER Organization, Copyright 2020-2023 Karel Lucas van de Plassche karelvandeplassche@gmail.com, Copyright 2020-2022 Daan van Vugt dvanvugt@ignitioncomputing.com, and Copyright 2020 Dutch Institute for Fundamental Energy Research info@differ.nl. It is licensed under LGPL 3.0.

Acknowledgments

Inspired and bootstrapped by existing tools, notably the IMAS Python HLI, IMAS Python workflows, and OMAS.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imas_python-2.2.0.tar.gz (2.8 MB view details)

Uploaded Source

Built Distribution

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

imas_python-2.2.0-py3-none-any.whl (2.4 MB view details)

Uploaded Python 3

File details

Details for the file imas_python-2.2.0.tar.gz.

File metadata

  • Download URL: imas_python-2.2.0.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for imas_python-2.2.0.tar.gz
Algorithm Hash digest
SHA256 200e84af481a4cf71e03b4e56bc25d7c7b8f8d514a8139e914e8fbe96fdb705a
MD5 9a54dfa1e13800fc8135610d82251410
BLAKE2b-256 de5d3b5bed0d47856b5677449cc3dafb91c461beca968af7eab5aef686e7d694

See more details on using hashes here.

Provenance

The following attestation bundles were made for imas_python-2.2.0.tar.gz:

Publisher: publish.yml on iterorganization/IMAS-Python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file imas_python-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: imas_python-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for imas_python-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52a16cd13d7756413ff918c0cf754d42ab9ac61ae2524ab7f72a9df00a70637c
MD5 eafca8ca752282d824a65cdb71ac28b1
BLAKE2b-256 80c351724c1ba79aa3f34566750de5a0ad41176a272b19e0585dc62aea3a987b

See more details on using hashes here.

Provenance

The following attestation bundles were made for imas_python-2.2.0-py3-none-any.whl:

Publisher: publish.yml on iterorganization/IMAS-Python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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