Install & Compatibility
Where this runs
tested against v0.6.1 · 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.362s · 90.3MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.8s · import 0.358s · 87MB
90MB installed
● package 90MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
CifFile
✓ from parsnip import CifFile
✗ from parsnip_cif import CifFile
The package installs as 'parsnip-cif', but import uses 'parsnip' as the module name.
Basic parsing of CIF data using CifFile.
from parsnip import CifFile
# Parse from a string
cif_text = """
data_test
_cell_length_a 10.0
_cell_length_b 10.0
_cell_length_c 10.0
"""
cif = CifFile(cif_text, source='string')
print(cif.keys()) # ['_cell_length_a', '_cell_length_b', '_cell_length_c']
print(cif.get('_cell_length_a')) # '10.0'
# Parse a file (using context manager)
# with open('structure.cif', 'r') as f:
# cif = CifFile(f)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'parsnip_cif'
Attempting to import the module using the package name 'parsnip_cif' instead of the correct module name 'parsnip'.
fixReplace 'import parsnip_cif' with 'import parsnip' or 'from parsnip import CifFile'.
FileNotFoundError: [Errno 2] No such file or directory: 'data_test\n_cell_length_a 10.0...'
Passing a raw CIF string directly to CifFile without specifying source='string' causes it to treat the string as a file path.
fixUse CifFile(your_string, source='string') instead.
Upgrade
Version history
0.6.1latest on PyPI · released Jun 11, 2026
Audit
Dependencies
No dependency data recorded yet.