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.

Release files for fprime-fpp-format 3.3.17

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 3.3.17
File Size Uploaded
fprime_fpp_format-3.3.17.tar.gz 129.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for fprime-fpp-format 3.3.17
File Interpreter ABI Platform
fprime_fpp_format-3.3.17-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
fprime_fpp_format-3.3.17-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
fprime_fpp_format-3.3.17-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 1.5 MB

Release files / fprime_fpp_format-3.3.17.tar.gz

Download URL fprime_fpp_format-3.3.17.tar.gz
Size 129.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d3a41151bc52b314890b90aac1417e0d101ec9606504f7cbff11f2c9ae6aa20f
BLAKE2b-256 checksum
How to use checksums
0069cad80bf9f0f154a61ed024e9a6b4f2e5eba1be67a3e71449b7b07c224a3c
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 Sep 12, 2026.

Transparency log

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

Download URL fprime_fpp_format-3.3.17-py3-none-win_amd64.whl
Size 421.1 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
1e029800d65acc42e5991f3b63093bb95d4b774eb9bc8791d1ae1e7e7628874f
BLAKE2b-256 checksum
How to use checksums
5d3291789d2896f93f9236403dc7fa512ad2da86b5f643b1eb0e9a1635f3037c
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 Sep 12, 2026.

Transparency log

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

Download URL fprime_fpp_format-3.3.17-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 517.9 kB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
6c2e40f937911e76ef2cc3ac1b554cf3389d0491960a61db2373d46a739f1ccf
BLAKE2b-256 checksum
How to use checksums
c9a779a5828a13a8272dbf2eb71b8dbc92a248dabb7b3b6cca3e2d7fad7d1f14
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 Sep 12, 2026.

Transparency log

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

Download URL fprime_fpp_format-3.3.17-py3-none-macosx_11_0_arm64.whl
Size 471.2 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
72881a28cca0ec8849d6455f5c9daef58f81026d3169f8a59988b5da11846ed2
BLAKE2b-256 checksum
How to use checksums
c64034a1540c3717cebe8ab9d5f0ca54c3abe41398151f59379528844074e948
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 Sep 12, 2026.

Transparency log

Release history Release notifications | RSS feed

3.3.25

4 release files

3.3.24

4 release files

3.3.23

4 release files

3.3.21

4 release files

3.3.20

4 release files

3.3.19

4 release files

3.3.18

4 release files

This release

3.3.17 This release

4 release files

3.3.16

4 release files

3.3.15

4 release files

3.3.14

4 release files

3.3.13

4 release files

3.3.12

4 release files

3.3.11

4 release files

3.3.10

4 release files

3.3.9

4 release files

3.3.8

4 release files

3.3.7

4 release files

3.3.6

4 release files

3.3.5

4 release files

3.3.4

4 release files

3.3.3

4 release files

3.3.2

4 release files

3.3.1

4 release files

3.3.0

4 release files

3.0.0

4 release files

2.3.1

4 release files

2.3.0

4 release files

2.2.1

4 release files

2.2.0

4 release files

2.1.0

4 release files

2.0.2

4 release files

2.0.1

4 release files

2.0.0

4 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