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

Uploaded Python 3

File details

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

File metadata

  • Download URL: imas_python-2.3.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.12

File hashes

Hashes for imas_python-2.3.0.tar.gz
Algorithm Hash digest
SHA256 10ba222cd4b1feec744ba4f58a59ab54e0cef86139178f6401274694c69aeb8f
MD5 e07386f2bd3af757a685421dddcf98ff
BLAKE2b-256 a5258d0088c182846c325d903d67610171b111942059d64331f92d20bd4a8b62

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: imas_python-2.3.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.12

File hashes

Hashes for imas_python-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75256993c60e08394c690afe342647fd1cb15055f2ee18ccf3cce13da4ead294
MD5 744e30f27b13a95c1c6bdc263f3c122f
BLAKE2b-256 7432e6160238f38c7eed9370c32928a6da2aedf9a6c41b65d8daef70bbb95d62

See more details on using hashes here.

Provenance

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