fvs2py
A Python wrapper of the Forest Vegetation Simulator (FVS).
This project has been designed to provide programmatic access to FVS through the FVS-API from Python. It is inspired by and generally follows the pattern demonstrated by rFVS, which loads a pre-compiled shared library of a single FVS variant and provides the user access to FVS variables and commands from a modern programming language.
Our initial focus is to replicate the functionality provided by rFVS.
We will then build upon the addition of new subroutines in Fortran that extend the underlying FVS-API and to produce corresponding wrapper functions here in fvs2py that will allow users access to get and set a broader suite of FVS parameters. The ultimate goal for this Python API is to allow users to run FVS, get and set simulation parameters at runtime, and to retrieve FVS output tables at runtime and in-memory without needing to interact with an external database or other output files.
Installation
pip install fvs2py
fvs2py is a wrapper, and doesn't currently ship with the FVS libraries included. You supply a compiled FVS variant library, either your own build, an official USFS release (currently Windows only), or one from the usfs-fvs container image (ghcr.io/vibrant-planet-open-science/usfs-fvs), which has every variant's library at /usr/local/lib/FVS<variant>.so. We're working to make updates to this package so that it can come with FVS libraries included and will keep this documentation up-to-date when those updates land.
Usage
from fvs2py import FVS
fvs = FVS("/path/to/FVSpn.so")
fvs.load_keyfile("name.key")
fvs.run()
fvs.summary # pandas DataFrame
Command line
fvs2py also installs an fvs command that works like FVS executables do. These two commands are equivalent:
FVSpn --keywordfile=name.key # FVS executable (PN variant)
fvs --lib=/path/to/FVSpn.so --keywordfile=name.key # fvs2py equivalent
Most users of fvs2py should primarily expect to use the Python interface. The CLI is for running FVS in a separate process, so a crash by FVS doesn't take down your program and its output can be captured.
Contributing
See CONTRIBUTING.md for development setup, tests, and pre-commit hooks.
Metadata
Release files for fvs2py 0.3.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 | Provenance | Actions |
|---|---|---|---|---|
| fvs2py-0.3.0.tar.gz | 30.5 kB | With provenance | Details for fvs2py-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fvs2py-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for fvs2py-0.3.0-py3-none-any.whl |
Total release size: 62.8 kB
Release files / fvs2py-0.3.0.tar.gz
| Download URL | fvs2py-0.3.0.tar.gz |
|---|---|
| Size | 30.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f30da4dea5c24775dbfcd2c11eb2bf3628d486a36efb8d4c294877f0bc05b8e
|
|
BLAKE2b-256 checksum How to use checksums |
ed73941fca1b89dec1f35a2101ff9ce641dbbd69cea61fc2e767ceb66d12c978
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 18, 2026.
Transparency logRelease files / fvs2py-0.3.0-py3-none-any.whl
| Download URL | fvs2py-0.3.0-py3-none-any.whl |
|---|---|
| Size | 32.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9229495e925717325f8a3f753b9b4fd4e1165bc1ababeba8e0572d1c28ef642
|
|
BLAKE2b-256 checksum How to use checksums |
3ad692c503cf456d4f0865d148cd810a8bf9c05ce4de7beeca974e68417a5e3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 18, 2026.
Transparency logSecurity for fvs2py 0.3.0
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
Both files in this release have been uploaded with provenance metadata.
Attestation for fvs2py-0.3.0.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 Nov 18, 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.