Install & Compatibility
Where this runs
tested against v0.0.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.052s · 22.5MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.3s · import 0.046s · 23MB
20MB installed
● package 20MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ion_to_json
✓ from pyion2json import ion_to_json
Main conversion function for single Ion value.
ion_cursor_to_json
✓ from pyion2json import ion_cursor_to_json
Convert an Ion cursor/iterable to JSON.
Loads an Ion value and converts to JSON string.
from pyion2json import ion_to_json
import amazon.ion.simpleion as ion
ion_data = b'{name: "Alice", age: 30}'
ion_val = ion.loads(ion_data)
json_str = ion_to_json(ion_val)
print(json_str)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'amazon'
The dependency amazon.ion is not installed.
fixpip install amazon.ion
AttributeError: module 'pyion2json' has no attribute 'ion_to_json'
Incorrect import or old version installed.
fixUse: from pyion2json import ion_to_json
Upgrade
Version history
0.0.2latest on PyPI · released Mar 13, 2020
Audit
Dependencies
amazon.ionrequiredRequired for parsing Ion data internally.