Skip to main content

[!WARNING] This repository is deprecated. Please read the MIGRATION guide for information on how to migrate to the latest supported FPP Python API.

The final supported version will be F Prime 4.4.0 (fpp 3.4.0).

F Prime Python Model

F Prime Python Model is a utility for translating fpp-to-json AST, Location Map, and Analysis JSON to Python data structures. For more information on the fpp-to-json tool, see the FPP User's Guide.

Installation

pip install git+https://github.com/fprime-community/fprime-python-model.git

Usage

In order to use this utility, you must first run the fpp-to-json tool to generate the AST, Location Map, and Analysis JSON files for a given FPP model.

  • When using fpp-to-json as part of a larger project, you can set FPRIME_ENABLE_JSON_MODEL_GENERATION=ON in your settings.ini to generate JSON files automatically.

  • For specific steps on how to run fpp-to-json manually, see the FPP User's Guide.

    Note: When running the fpp-to-json tool, ensure that you do not include the -s option as that will prevent the Analysis JSON from being generated.

Once the AST, Location Map, and Analysis JSON files have been generated, you can translate the model JSON to it's Python representation by doing:

from fprime_python_model.model import FprimePythonModel

model = FprimePythonModel(
    ast_file_path, # Path to AST JSON file
    locations_file_path, # Path to Location Map JSON file
    analysis_json_file_path # Path to Analysis JSON file
)

Once an FprimePythonModel is constructed, you can access the python data structures that represent the FPP AST, Location Map, and Analysis of the model:

model.ast # Model AST
model.location_map # Location map
model.analysis # Model Analysis data structure

Traversing AST

You can traverse AST nodes by writing an AST visitor, which can be used to query or search the AST of a model. An AST visitor base class (AstVisitor) is provided in fprime_python_model/utils/fpp_ast_visitor.py.

Examples of how the AstVistor is used in this project are:

  • fprime_python_model/utils/fpp_ast_writer.py, which is used to print the AST to the console
  • fprime_python_model/translators/construct_ast_id_map.py, which is used to create a mapping from AST IDs to AST nodes.

Metadata

Release files for fprime-python-model 3.4.0

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

Source distribution (sdist)

Source distribution for fprime-python-model 3.4.0
File Size Uploaded
fprime_python_model-3.4.0.tar.gz 220.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fprime-python-model 3.4.0
File Interpreter ABI Platform
fprime_python_model-3.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 324.1 kB

Release files / fprime_python_model-3.4.0.tar.gz

Download URL fprime_python_model-3.4.0.tar.gz
Size 220.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5675353f21a8ff2780dc668e44831f9aba6584f0ab8562277581deffe431b73f
BLAKE2b-256 checksum
How to use checksums
88356b63c1e883aa3cadb224fbfda3423e598cc251a592910fc637a39fd87d3a
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 2, 2026.

Transparency log

Release files / fprime_python_model-3.4.0-py3-none-any.whl

Download URL fprime_python_model-3.4.0-py3-none-any.whl
Size 103.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
015c4685fc0e8c9860ceaf15ab9d9f8078a661ff4427c9e2c41d2d250b864832
BLAKE2b-256 checksum
How to use checksums
ee7aa168c1ca016eb1dc2368315261f07f6021a5b9a85a1d44991b1133c4eba3
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 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.4.0 This release

2 release files

3.3.1

2 release files

3.3.0

2 release files

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