IMAS Data Dictionaries converted to Python Dataclass used in the IMAS-GK/IDSPy project
Project description
IDSPy_Dictionaries
IMAS Data Dictionaries converted to Python Dataclass used in the IDSPy suite.
Prerequisites
To use this script, you need to have Python 3.10 or later installed. You can download Python from https://www.python.org/downloads/.
Installation
To install the necessary packages, run the following command:
python -m pip install idspy_dictionaries
Usage
To load the desired IDS :
from idspy_dictionaries import ids_gyrokinetics # or any other available IDS
new_ids = ids_gyrokinetics.Gyrokinetics()
FAQ
- Q: What is the minimum required version of Python to run this script?
- A: The minimum recommended version of Python is 3.10. It can be used with Python >= 3.8
but there is no support in that case.
- Q: Can I add new members to the dataclasses?
A: This option is not possible to be sure that the dataclasses follow the IMAS conventions.
- Q: Is the package compatible with pydantic and/or attrs?
A: Short answer, no ;)
- Q: I would really like to use python <3.10 is it really impossible?
- A: IDSPy_dictionaries used mainly python dataclasses and the slot property which had been added in python 3.10 only.
The main reason to use __slots__ is to avoid addition of members in the IDS and remains fully compliant with IMAS. A version of the package had been published “as it is” without the slots dependency and is available through pip.
- Q: Can I load all the dictionaries at once?
A: For performances reasons, it’s not possible right now.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for idspy_dictionaries-33801.0.100.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f3ba42b4c809e08ce82cc3a17b1da9617ea4f8b2c625ccda855e28484428789 |
|
MD5 | 8942ecbf35b2f19b8dfddbf7acf00d44 |
|
BLAKE2b-256 | 7103881407e82f1942f7ecc811eb2ba5d77d26d96764bdcfae4b573544838c6f |
Hashes for idspy_dictionaries-33801.0.100-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6b8c333150806786ee7f169eae0fd057a97fc396e5d77d7dffa09c0c3c0281e |
|
MD5 | 2c362850f7312322bb58ab5248e18966 |
|
BLAKE2b-256 | 0626651fa9f1ddd6ba6e0a628075b77849300f47be49f125fc79bf502b0b4e95 |