An embedded Python DSL for specifying and simulating numerical algorithms.
Important links:
- PyPI package: fpy2
- Documentation: fpy.readthedocs.io
- GitHub: fpy
- Guide: USAGE.md
FPy can be installed from PyPI with either uv or pip, or built from
source for development. The following instructions assume a bash-like
shell.
Requirements:
- Python 3.11 or later
To install the latest stable release of FPy, run:
uv pip install fpy2or, with pip:
pip install fpy2Requirements:
- Python 3.11 or later
make
uv is the recommended development workflow — it handles the virtual environment and dependency installation in a single step:
uv syncThis creates .venv/ and installs FPy in editable mode along with the
dev dependency group. Activate the environment with
source .venv/bin/activateor prefix individual commands with uv run (e.g. uv run pytest tests/unit).
This path is preserved for compatibility with existing tooling; new
contributors should prefer uv above.
If you do not have a Python virtual environment, create one using
python3 -m venv .venv/and activate it using
source .venv/bin/activateTo install an instance of FPy for development, run:
pip install -e .[dev]To uninstall FPy, run:
pip uninstall fpy2There are a number of tests that can be run through
the Makefile including
make lintto ensure formatting and type safety;
make unittestto run the unit tests;
make infratestto run the infrastructure tests.