Skip to main content

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.2.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 fvs2py 0.2.2
File Size Uploaded Provenance Actions
fvs2py-0.2.2.tar.gz 29.3 kB With provenance Details for fvs2py-0.2.2.tar.gz

Built distribution (wheel)

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

Total release size: 60.3 kB

Release files / fvs2py-0.2.2.tar.gz

Download URL fvs2py-0.2.2.tar.gz
Size 29.3 kB
Tags Source
SHA-256 checksum
How to use checksums
390f7fed7bd8b9fa8eae01a252fc4ddb3d47e88c3bf0c3a71f76c9b7e72aa9cd
BLAKE2b-256 checksum
How to use checksums
20eb9690ad600301221f9f73c3338c932dafa7c7ad40fa4876787fb3b2dd22fe
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 log

Release files / fvs2py-0.2.2-py3-none-any.whl

Download URL fvs2py-0.2.2-py3-none-any.whl
Size 31.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1f5612539f6de6e275d01d2e49d63807ae480cd197cbc3dd0af652c9b2c43fa
BLAKE2b-256 checksum
How to use checksums
e5dd81388615ab81e90445f32b6e2edc747d6703e4d18ecaadf6bbc6905f1c7c
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 log

Security for fvs2py 0.2.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fvs2py-0.2.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 Nov 18, 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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