parsnip is a minimal Python library for parsing CIF files. While its primary focus is on simplicity and portability, performance-oriented design choices are made where possible.
Importing parsnip allows users to read CIF 1.1 files, as well as many features from the CIF 2.0 and mmCIF formats. Creating a CifFile object provides easy access to name-value pairs, as well as loop_-delimited loops. Data entries can be extracted as python primitives or numpy arrays for further use.
Setup
parsnip may be installed with pip or from conda-forge.
Installation via pip
python -m pip install parsnip-cif
Installation via conda-forge
conda install -c conda-forge parsnip-cif
Installation from source
First, clone the repository:
git clone https://github.com/glotzerlab/parsnip.git
cd parsnip
Then, choose one of the following. While parsnip is only dependent on Numpy, additional dependencies are required to run the tests and build the docs.
pip install . # Install with no additional dependencies
pip install .[tests] # Install with dependencies required to run tests
pip install .[tests,doc] # Install with dependencies required to run tests and make docs
To obtain a correct set of locked dependencies, we recommend the use of the uv package manager to install from uv.lock:
uv sync --extra tests # Or --all-extras to build the documentation
Dependencies
numpy>=1.19
more-itertools
Support and Contribution
Please visit our repository on GitHub for the library source code. Any issues or bugs may be reported at our issue tracker, and tips and best practices for contributing to the project are included in the development guide. All contributions to parsnip are welcomed via pull requests!
Metadata
Release files for parsnip-cif 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| parsnip_cif-1.0.0.tar.gz | 57.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| parsnip_cif-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 104.8 kB
Release files / parsnip_cif-1.0.0.tar.gz
| Download URL | parsnip_cif-1.0.0.tar.gz |
|---|---|
| Size | 57.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
738bed52398fddc2ef801510dde22e2f139298beffccfb59dd887ec9e7e2381c
|
|
BLAKE2b-256 checksum How to use checksums |
1b8a1e497e88b6675498039a9d5a4a493e2d192a365b34c8596a910cd5a52a39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 8, 2026.
Transparency logRelease files / parsnip_cif-1.0.0-py3-none-any.whl
| Download URL | parsnip_cif-1.0.0-py3-none-any.whl |
|---|---|
| Size | 47.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
091086da6b0bf6499c121972e4b88e4c1953ab8672b08501a5942169d083747e
|
|
BLAKE2b-256 checksum How to use checksums |
3029cd367ef73ec903c47d75b521965105ae2e5f57897ff7450af8201f3a17b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 8, 2026.
Transparency log