moreniius
A project to contain custom components required to use eniius to produce NeXus Structure JSON from mccode-antlr simulated instruments.
Simply, more eniius.
Features
Path-based Navigation for NeXus Structure JSON
The NexusStructureNavigator class provides convenient path-based access to NeXus Structure JSON objects, which have a verbose hierarchical format. It supports both path-based access and chainable navigation.
Without Navigator (verbose)
from moreniius import to_nexus_structure, load_instr
structure = to_nexus_structure(load_instr('instrument.instr'))
# Access requires nested dictionary lookups
component = structure['children'][0]['children'][0]['children'][12]
# Accessing attributes is even more verbose
attrs = structure['children'][0]['attributes']
nx_class = next(a for a in attrs if a['name'] == 'NX_class')
With Navigator (clean and chainable)
from moreniius import to_nexus_structure, load_instr, NexusStructureNavigator
structure = to_nexus_structure(load_instr('instrument.instr'))
nav = NexusStructureNavigator(structure)
# Path-based access (returns Navigator for groups)
component = nav['/entry/instrument/component_name']
field = nav['/entry/instrument/component_name/field']
# Chainable navigation - each group access returns a new Navigator!
component = nav['entry']['instrument']['component_name']
# Get the underlying dictionary
raw_dict = component.dict() # or component.structure
# Access attributes with '@' prefix (returns raw dict)
nx_class = nav['/entry/@NX_class']
vector = nav['/entry/instrument/something/@vector']
# Attributes can also be accessed from Navigator objects
nx_class = nav['entry']['instrument']['mon0']['@NX_class']
# Check if paths exist
if nav.exists('/entry/instrument/mon0'):
mon0 = nav['/entry/instrument/mon0']
# Get with default value
result = nav.get('/entry/instrument/missing', default=None)
# Find all elements with a given name
monitors = nav.find_all('mon0')
# Find all attributes with a given name
all_nx_classes = nav.find_all('NX_class', include_attributes=True)
# Reverse lookup - get path to an element (requires raw dict)
path = nav.get_path(component.structure) # Returns '/entry/instrument/component_name'
attr_path = nav.get_path(nx_class) # Returns '/entry/@NX_class'
Key behaviors:
- Accessing a group (has
children) returns aNexusStructureNavigatorfor chaining - Accessing an attribute (with
@), dataset, or link returns the raw dictionary - Use
.dict()or.structureto get the underlying dictionary from a Navigator
See examples/path_navigator_demo.py for a complete working example.
Metadata
Release files for moreniius 0.10.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| moreniius-0.10.1.tar.gz | 143.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| moreniius-0.10.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 176.7 kB
Release files / moreniius-0.10.1.tar.gz
| Download URL | moreniius-0.10.1.tar.gz |
|---|---|
| Size | 143.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
10dc17350f5faa142c0d9344a7932e2c9b86a23b67a6a2a35aded499537f0b26
|
|
BLAKE2b-256 checksum How to use checksums |
7b30fa216e9a52ad32c3a20d820806c0ad0b5b5a22975175fd984afd3af1ce51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logRelease files / moreniius-0.10.1-py3-none-any.whl
| Download URL | moreniius-0.10.1-py3-none-any.whl |
|---|---|
| Size | 32.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
09c33365c98bfc5bc289cd36975dc379a8b2faf6405065dc9e22282f63e0a469
|
|
BLAKE2b-256 checksum How to use checksums |
9556f9a61de81b0ea43c54fe353ffbe168662aeb8367127efd345042b7fda07c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logSecurity for moreniius 0.10.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for moreniius-0.10.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.