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.1.0.post1.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.1.0.post1-py3-none-any.whl (2.4 MB view details)

Uploaded Python 3

File details

Details for the file imas_python-2.1.0.post1.tar.gz.

File metadata

  • Download URL: imas_python-2.1.0.post1.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.1.0.post1.tar.gz
Algorithm Hash digest
SHA256 4f2ab0dcb4ab1f1430b1b160e1b77f26909894a33cb33704e51747f6a554f4ae
MD5 1cf66251410820e98298eb23d82f6d4c
BLAKE2b-256 3919035a38ec696d4fb3486b1f6e5466ee6e5e08735a2ad99505f8b68266ee92

See more details on using hashes here.

Provenance

The following attestation bundles were made for imas_python-2.1.0.post1.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.1.0.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for imas_python-2.1.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 606e284f6e02567113294a9631fa9a35b99a12a33b1c7caefe72fe5f5c86114d
MD5 764ffbe3a56567522feeb9a3070f2dda
BLAKE2b-256 9bbf2121e8c85d212ebebf861f0594a02e8b7f8f3a13027f2979c335706ee5fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for imas_python-2.1.0.post1-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