Skip to main content

fprime-fpp-format

A formatter for the F Prime Prime (FPP) modeling language.

This package ships the fpp-format executable, a pretty-printer for .fpp source files.

Usage

# Format files in place
fpp-format path/to/model.fpp

# Check formatting without modifying (exit 1 if not formatted)
fpp-format --check path/to/model.fpp

# Format from stdin to stdout
cat path/to/model.fpp | fpp-format --stdin

# Override the indentation width and maximum line length
fpp-format --indent 2 --line-length 100 path/to/model.fpp

Options

Option Description
--check Check formatting without writing; exit 1 if a file is unformatted.
--stdin Read from stdin and write to stdout (default when no files given).
--recursive-includes Also follow include specifiers and format reachable .fppi fragments.
--indent <N> Number of spaces per indentation level. Overrides .fpp-format (default: 4).
--line-length <N> Maximum line width before specs explode their clauses. Overrides .fpp-format (default: 80).
--entry <RULE> Select the parser entrypoint / grammar rule (see below).
--help Print usage.

Configuration file (.fpp-format)

The indentation width and maximum line length can be set project-wide in a .fpp-format file. Starting from each formatted file's directory, fpp-format searches upward through parent directories for the nearest .fpp-format file (the same discovery model as .clang-format). The same file is honored by fprime-util format and by the language server's format-on-save, so the editor and CI always agree.

The file is a minimal key = value list; blank lines and # comments are ignored:

# .fpp-format
indent = 4
line-length = 80

Supported keys:

Key Description Default
indent Spaces per indentation level. 4
line-length Maximum line width before clauses break. 80

Precedence, lowest to highest: built-in defaults → .fpp-format file → --indent / --line-length command-line flags. A malformed .fpp-format file is a hard error on the command line (to avoid formatting with the wrong profile and reporting false --check failures); the language server logs it and falls back to defaults so an editor save never fails.

Entrypoint rule (--entry)

The formatter parses input starting from a specific grammar rule. A whole .fpp file is a module (the default), but other rules are needed when formatting include fragments.

Supported rules:

  • module (default)
  • component
  • topology
  • tlm-packet
  • tlm-packet-set

Recursive include formatting (--recursive-includes)

By default fpp-format formats only the files you name and does not touch .fppi fragments referenced via include. Pass --recursive-includes to also follow every include specifier and format the referenced fragments (recursively):

# Formats model.fpp and every .fppi it (transitively) includes
fpp-format --recursive-includes path/to/model.fpp

With --recursive-includes, include paths are resolved relative to the including file (matching the parser), each fragment is formatted exactly once even if included from several places, and include cycles are detected and reported as an error. The entrypoint for each fragment is derived from the context of its include — a fragment included in a component { ... } body is formatted as component members, one in a topology { ... } body as topology members, and so on, so you do not need --entry for fragments reached this way.

State-machine includes have no standalone entrypoint and are left untouched.

Note: the language-server integration never follows includes; it only ever formats the current document buffer.

Formatting a bare .fppi file

An .fppi file is not a standalone module — it is a fragment that is spliced in via an include specifier. When you format a fragment directly (rather than reaching it from a root .fpp), there is no include context to infer the rule from, so pass --entry to select the matching entrypoint:

# An .fppi included inside a `module { ... }` body (module-level members)
fpp-format --entry module commands.fppi

# An .fppi included inside a `component { ... }` body
fpp-format --entry component ports.fppi

# An .fppi included inside a `topology { ... }` body
fpp-format --entry topology connections.fppi

If you omit --entry, the module rule is used, which is correct for normal .fpp files and for .fppi fragments containing module-level members.

Module templates

module template definitions and expand specifiers are formatted like any other definition and specifier: a template parameter list breaks and indents like a formal parameter list, its trailing annotations align in a column, and a template argument list behaves like any other parenthesized list.

There is no equivalent of the Scala tool's fpp-format -t, which expands module templates before printing. That flag prints an expansion specifier together with its expanded body, expand Q(args) { members }, and that is not valid FPP surface syntax — an expand specifier never carries a body. This formatter's contract is that its output reparses and that reformatting it changes nothing, so an expansion specifier is printed as written and expanding it is left to the analyzer.

Metadata

Release files for fprime-fpp-format 4.0.1

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-fpp-format 4.0.1
File Size Uploaded Provenance Actions
fprime_fpp_format-4.0.1.tar.gz 324.0 kB With provenance Details for fprime_fpp_format-4.0.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for fprime-fpp-format 4.0.1
File Actions
fprime_fpp_format-4.0.1-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for fprime_fpp_format-4.0.1-py3-none-win_arm64.whl
fprime_fpp_format-4.0.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for fprime_fpp_format-4.0.1-py3-none-win_amd64.whl
fprime_fpp_format-4.0.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for fprime_fpp_format-4.0.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
fprime_fpp_format-4.0.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for fprime_fpp_format-4.0.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
fprime_fpp_format-4.0.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for fprime_fpp_format-4.0.1-py3-none-macosx_11_0_arm64.whl
fprime_fpp_format-4.0.1-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for fprime_fpp_format-4.0.1-py3-none-macosx_10_12_x86_64.whl

Total release size: 3.2 MB

Release files / fprime_fpp_format-4.0.1.tar.gz

Download URL fprime_fpp_format-4.0.1.tar.gz
Size 324.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fcec4ff3c080a77ec5896c31d36098d2c860cfaeaf7255ead342cf3694fb4d3d
BLAKE2b-256 checksum
How to use checksums
91d91cfc1fd65bac4b753e9fe59763bb9fe7a234177d786aec0f0d57029a2e0e
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 10, 2026.

Transparency log

Release files / fprime_fpp_format-4.0.1-py3-none-win_arm64.whl

Download URL fprime_fpp_format-4.0.1-py3-none-win_arm64.whl
Size 418.2 kB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
99fd87c7b75cd94608a4f921134ed37ee63f10446f6cab23893adff4d3c6dce2
BLAKE2b-256 checksum
How to use checksums
7e1db8652cd5cbdc436f562ffe32a9844ecea3bb9aa4933b9a020a78b87dfa41
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 10, 2026.

Transparency log

Release files / fprime_fpp_format-4.0.1-py3-none-win_amd64.whl

Download URL fprime_fpp_format-4.0.1-py3-none-win_amd64.whl
Size 440.0 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
2fe753111f451e5398ff491cc3488da26898111d13c18f1dd6d0ee31e228f355
BLAKE2b-256 checksum
How to use checksums
16d045ad79b7d29a5b5463f1e7af8a2ab26ecfdfeec6bac3418f0bd3e7f6b807
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 10, 2026.

Transparency log

Release files / fprime_fpp_format-4.0.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL fprime_fpp_format-4.0.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 529.3 kB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
be39a3781c63b45a13e69a076936422b3161caac8cfbdc5cec3a0f03c72e6649
BLAKE2b-256 checksum
How to use checksums
2908ae088236ec872cdbfc654656029c197aaf82659b333aea2c8ca988816ac1
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 10, 2026.

Transparency log

Release files / fprime_fpp_format-4.0.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL fprime_fpp_format-4.0.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 510.7 kB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
922c8610a744dbb75a31b9df486197b4c582dd2ae2b7a4886db83c9a834cc95b
BLAKE2b-256 checksum
How to use checksums
f4ded736ec1c3d9f0619e8973e24f75eeb6eaec0042354a121fad2e6e6bbfbde
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 10, 2026.

Transparency log

Release files / fprime_fpp_format-4.0.1-py3-none-macosx_11_0_arm64.whl

Download URL fprime_fpp_format-4.0.1-py3-none-macosx_11_0_arm64.whl
Size 486.3 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
75f4a00f35b771bca34981aa75d7dfe40a73673c01cc5bcb70bd82b3770233af
BLAKE2b-256 checksum
How to use checksums
dfee5299e506f18c645272a15b6c5caf686ff0a10444121881c0d778093c0ab9
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 10, 2026.

Transparency log

Release files / fprime_fpp_format-4.0.1-py3-none-macosx_10_12_x86_64.whl

Download URL fprime_fpp_format-4.0.1-py3-none-macosx_10_12_x86_64.whl
Size 512.1 kB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
4b5c9f34659b34699cbacbb95ee25686b77920ce6d8e1d3c8d1dce395f031b5d
BLAKE2b-256 checksum
How to use checksums
165261178bea6615502e203ace63b32d09197c62b4e5cc636685340ab3c5dab0
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 10, 2026.

Transparency log

Security for fprime-fpp-format 4.0.1

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 7 files in this release have been uploaded with provenance metadata.

Select from 7 files

Attestation for fprime_fpp_format-4.0.1.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 10, 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.

Release history Release notifications | RSS feed

This release

4.0.1 This release

7 release files Full provenance

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