Skip to main content

flow_state

Compressible flow state calculations for Python.

Test codecov DOI PyPI Docs Webapp License Python Ruff

Install

pip install flowstate

Quick Start

API:

from flow_state import solve

# From Mach and altitude
state = solve(mach=2.0, altitude=10000)

# From Mach and stagnation conditions (wind tunnel)
state = solve(mach=6, pres_stag=(140, "psi"), temp_stag=420)

# From Mach and target unit Reynolds number
state = solve(mach=5.3, re1=12.8e6)

print(state)  # Full summary
print(state.pres, state.temp, state.re1)

CLI:

flow-state init    # Create a config template
flow-state solve   # Solve from flow_config.toml
flow-state recover base_flow.hdf5  # Recover flow_conditions.json from HDF5 metadata

Documentation

Full documentation: https://uahypersonics.github.io/flow-state

Citation

If you use flow_state in your research, please cite it:

@software{flow_state,
  author = {Hader, Christoph},
  title = {flow\_state: Compressible Flow State Calculations},
  url = {https://github.com/uahypersonics/flow-state},
  year = {2026}
}

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
numpydoc Docstring sections (Parameters, Returns, Attributes) NumPy/SciPy docstring standard — the norm for scientific Python
Ruff Automated linting and formatting Enforces PEP 8 compliance automatically
typing / TYPE_CHECKING Type hints for IDE support and static analysis Python standard library

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:

  1. Regenerate the API architecture diagram:
    pydeps src/flow_state --noshow --max-bacon=4 --cluster -o docs/assets/architecture.svg
    
  2. Commit and push to main
  3. Tag and push:
    git tag -a 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 flowstate 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flowstate 0.6.2
File Size Uploaded Provenance
flowstate-0.6.2.tar.gz 1.6 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for flowstate 0.6.2
File Interpreter ABI Platform
flowstate-0.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 1.7 MB

Release files / flowstate-0.6.2.tar.gz

Download URL flowstate-0.6.2.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
05b89d6bffa8e43a4e72243cc417ffb97e0468b963a423a6769739104f8696e2
BLAKE2b-256 checksum
How to use checksums
70c52dcd2bed70de8b17b2384e859b8cf863609d0954316b1bf0ff8a25d0bd87
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 Oct 14, 2026.

Transparency log

Release files / flowstate-0.6.2-py3-none-any.whl

Download URL flowstate-0.6.2-py3-none-any.whl
Size 73.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e08e207a4279133e5f0911e85e63583b57d6473f96853e9f60f76a59aa87c950
BLAKE2b-256 checksum
How to use checksums
41604061a77ddd566214eb867bedb8f1e31a7938b9bc68c8b1fb06e38162edb8
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 Oct 14, 2026.

Transparency log

Security for flowstate 0.6.2

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.

Select from 2 files

Attestation for flowstate-0.6.2.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 Oct 14, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page