cfd-io
I/O toolkit for structured CFD data: read, write, and convert between formats.
Install
pip install cfd-io
Quick Start
from cfd_io import read_file, write_file, get_info
# inspect a file
info = get_info("flow.h5")
print(info.nx, info.ny, info.var_names)
# read data
grid, flow, attrs = read_file("flow.h5")
# write to a different format
write_file("flow.h5", grid, flow, attrs)
Features
- Unified API:
read_file/write_filedispatch by file extension - Format conversion:
do_convertreads one format, writes another - File inspection:
get_inforeturns structured metadata without loading data - CLI:
cfd-io convertandcfd-io infofor quick terminal use
CLI
# convert between formats
cfd-io convert grid.x grid.h5
# inspect a file
cfd-io info grid.h5
Testing
pytest tests/ --cov --cov-report=term-missing \
--ignore=tests/test_tecplot_ascii.py \
--ignore=tests/test_tecplot_binary.py \
--ignore=tests/test_plt.py -q
Documentation
Full documentation: https://uahypersonics.github.io/cfd-io
Citation
If cfd-io contributes to published work, please cite the software release:
- DOI (concept, always latest): 10.5281/zenodo.18926271
GitHub also provides machine-readable citation metadata via CITATION.cff in this repository.
Code Style
This project follows established Python community conventions so that contributors can focus on the physics rather than inventing formatting rules.
| Convention | What it covers | Reference |
|---|---|---|
| PEP 8 | Code formatting, naming, whitespace | Python standard style guide |
| PEP 257 | Docstring structure (triple-quoted, imperative mood) | Python standard docstring conventions |
| Google style | Docstring sections (Args, Returns, Raises) |
Google Python style guide |
| Ruff | Automated linting and formatting | Enforces PEP 8 compliance automatically |
| typing / TYPE_CHECKING | Type hints for IDE support and static analysis | Python standard library |
Versioning & Releasing
This project uses Semantic Versioning (vMAJOR.MINOR.PATCH):
- MAJOR (
v1.0.0,v2.0.0): Breaking API changes - MINOR (
v0.3.0,v0.4.0): New features, backward-compatible - PATCH (
v0.3.1,v0.3.2): Bug fixes, minor corrections
To publish a new version to PyPI:
- Update the version in
pyproject.toml - Regenerate the API architecture diagram:
pydeps src/cfd_io --noshow --max-bacon=4 --cluster -o docs/assets/architecture.svg
- Commit and push to
main - Tag and push:
git tag -a vMAJOR.MINOR.PATCH -m "Release vMAJOR.MINOR.PATCH" git push origin vMAJOR.MINOR.PATCH
Use a signed tag when your GPG/SSH signing is configured:
git tag -s vMAJOR.MINOR.PATCH -m "Release vMAJOR.MINOR.PATCH"
git push origin vMAJOR.MINOR.PATCH
The GitHub Actions workflow will automatically build and publish to PyPI via Trusted Publishing.
License
GNU General Public License v3.0 or later. See LICENSE for the complete license terms.
Metadata
Release files for cfd-io 0.2.7
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 | |
|---|---|---|---|---|
| cfd_io-0.2.7.tar.gz | 111.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cfd_io-0.2.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 209.7 kB
Release files / cfd_io-0.2.7.tar.gz
| Download URL | cfd_io-0.2.7.tar.gz |
|---|---|
| Size | 111.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a218648b6613dafa6e238fce084d8489857ccde9c828c7dec5b59233ef6e42e5
|
|
BLAKE2b-256 checksum How to use checksums |
30d4cb5b5cff08de9a37c37ec0bfbc597107a4b07ef12a5bafdd60f268601c79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Sep 28, 2026.
Transparency logRelease files / cfd_io-0.2.7-py3-none-any.whl
| Download URL | cfd_io-0.2.7-py3-none-any.whl |
|---|---|
| Size | 97.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
55da3bcaa94bb0a959ef74dc7c45d53c297053e014975866565ca1d897acd31b
|
|
BLAKE2b-256 checksum How to use checksums |
06d84be21f15472aa0ff4b8146110884461ab9e61ced50c0f652f4b1c05529e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Sep 28, 2026.
Transparency logSecurity for cfd-io 0.2.7
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 cfd_io-0.2.7.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 Sep 28, 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.