Distribution and installation¶
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.
Version 0.1.x¶
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:
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.
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)
# print build exceptions
for puic, exceptions in imx.situation.get_build_exceptions():
print(puic, [exception.msg for exception in exceptions])
# get all
all_objects = imx.situation.get_all()
# get from situation
imx_object = imx.initial_situation.find("puic_uuid4")
# get all types
object_types = imx.new_situation.get_types()
# get by type
object_subset = imx.new_situation.get_by_types([object_types[0], imx_object.tag])
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)
# 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])
Dependencies¶
lxml , shapely , pyproj , loguru , pandas , xlsxwriter
Development dependencies¶
hatch , ruff , mypy , bumpversion , mkdocs , mkdocstrings , mkdocs-material