Distribution and installation¶
Version 0.1.x¶
Until we achieve the MVP of the library, we will build a Python wheel upon each release, which you can download from GitHub. In the future, we will release the new version on PyPI.
Info
We recommend using the stable and feature richer 0.1.0 release on for imx versions "1.2.4" and "5.0.0".
The 0.1.x version of imxInsights is distributed on PYPI and can be installed by the following pip command:
ImxInsights v0.2.x¶
This project is still in development, currently you have two options:
- Download the repository from github build a wheel and use it now.
- Wait for the official release, then download the wheel file and install it via pip.
- Wait for the official pypi and install it via pip.
We aim to release it on pypi end of Q4 2024.
Code samples and snippets¶
Below are minimal examples to load single imx file or imx containers. For more code samples and snippets in the example section / folder and use the api reference for exploration.
Load Single File IMX¶
from imxInsights import ImxSingleFile
imx = ImxSingleFile(r"path to xml file")
# print imx version and hash
print(imx.file.imx_version)
print(imx.file.file_hash)
Load Containerized IMX¶
from imxInsights import ImxContainer
imx = ImxContainer(r"path to xml zip container or folder")
# print imx version and hash
print(imx.files.signaling_design.imx_version)
print(imx.files.signaling_design.file_hash)
print(imx.files.observations.imx_version)
print(imx.files.observations.file_hash)
Get Insights¶
# print build exceptions
for puic, exceptions in imx.situation.get_build_exceptions():
print(puic, [exception.msg for exception in exceptions])
# get all from a situation
all_objects = imx.situation.get_all()
# get from init situation in a project
imx_object = imx.initial_situation.find("puic_uuid4")
# get all types new situation in a project
object_types = imx.new_situation.get_types()
# get by type new situation in a project
object_subset = imx.new_situation.get_by_types([object_types[0], imx_object.tag])
# print build exceptions
for puic, exceptions in imx.get_build_exceptions():
print(puic, [exception.msg for exception in exceptions])
# get all
all_objects = imx.get_all()
# get from situation
imx_object = imx.find("puic_uuid4")
# get all types
object_types = imx.get_types()
# get by type
object_subset = imx.get_by_types([object_types[0], imx_object.tag])