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 4 --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: 2). |
--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 = 2
line-length = 80
Supported keys:
| Key | Description | Default |
|---|---|---|
indent |
Spaces per indentation level. | 2 |
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)componenttopologytlm-packettlm-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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fprime_fpp_format-3.3.9.tar.gz.
File metadata
- Download URL: fprime_fpp_format-3.3.9.tar.gz
- Upload date:
- Size: 123.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6afd0d4349315b4a46b2bbc27cb33c437e962199e2da4b45c3697bedc7a5a339
|
|
| MD5 |
dcf228c8a97e8d793de2bcbed551a527
|
|
| BLAKE2b-256 |
a18feebbeea3fe7939d934d16e39d092019dd5231c35f81da758d8ad9e46f664
|
Provenance
The following attestation bundles were made for fprime_fpp_format-3.3.9.tar.gz:
Publisher:
pip.yml on fprime-community/fpp-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fprime_fpp_format-3.3.9.tar.gz -
Subject digest:
6afd0d4349315b4a46b2bbc27cb33c437e962199e2da4b45c3697bedc7a5a339 - Sigstore transparency entry: 2541165475
- Sigstore integration time:
-
Permalink:
fprime-community/fpp-tools@f6384aa8454da78ea481f9687ce203080927c975 -
Branch / Tag:
refs/tags/v3.3.9 - Owner: https://github.com/fprime-community
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pip.yml@f6384aa8454da78ea481f9687ce203080927c975 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fprime_fpp_format-3.3.9-py3-none-win_amd64.whl.
File metadata
- Download URL: fprime_fpp_format-3.3.9-py3-none-win_amd64.whl
- Upload date:
- Size: 418.7 kB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50adfa24070c1f256e08499290d0dae98c405912dcc445eb582a3cbea0f38ef5
|
|
| MD5 |
ef50c474777a85f0526239ca9a042ccf
|
|
| BLAKE2b-256 |
c03ba24978f7eb54ea6e7f6128e0baed7fdf8560d1e22ad96b81617843f8943c
|
Provenance
The following attestation bundles were made for fprime_fpp_format-3.3.9-py3-none-win_amd64.whl:
Publisher:
pip.yml on fprime-community/fpp-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fprime_fpp_format-3.3.9-py3-none-win_amd64.whl -
Subject digest:
50adfa24070c1f256e08499290d0dae98c405912dcc445eb582a3cbea0f38ef5 - Sigstore transparency entry: 2541167589
- Sigstore integration time:
-
Permalink:
fprime-community/fpp-tools@f6384aa8454da78ea481f9687ce203080927c975 -
Branch / Tag:
refs/tags/v3.3.9 - Owner: https://github.com/fprime-community
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pip.yml@f6384aa8454da78ea481f9687ce203080927c975 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fprime_fpp_format-3.3.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: fprime_fpp_format-3.3.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 517.0 kB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08b4a180d250bf7a37292e781fa1adae1c20ee2d021bc9157dc135a443c59e72
|
|
| MD5 |
a8be687ad9c1c692d2e29942dd646a9a
|
|
| BLAKE2b-256 |
7dd5ec14754d0a2b967e4a8a60517d6bebc5ecb6136d85d15b532731c5f349e4
|
Provenance
The following attestation bundles were made for fprime_fpp_format-3.3.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
pip.yml on fprime-community/fpp-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fprime_fpp_format-3.3.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
08b4a180d250bf7a37292e781fa1adae1c20ee2d021bc9157dc135a443c59e72 - Sigstore transparency entry: 2541166897
- Sigstore integration time:
-
Permalink:
fprime-community/fpp-tools@f6384aa8454da78ea481f9687ce203080927c975 -
Branch / Tag:
refs/tags/v3.3.9 - Owner: https://github.com/fprime-community
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pip.yml@f6384aa8454da78ea481f9687ce203080927c975 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fprime_fpp_format-3.3.9-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: fprime_fpp_format-3.3.9-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 472.2 kB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e7ae675231cb8308c2c1d6409258429fe64361a6a09576201eb7b5521083707
|
|
| MD5 |
ba4b4faa8b6c0a049cf8b5a8279a7ccd
|
|
| BLAKE2b-256 |
49c407b67aad85e32bd17462b4affbc37929cf4bf485c6ed600c76aa3d517247
|
Provenance
The following attestation bundles were made for fprime_fpp_format-3.3.9-py3-none-macosx_11_0_arm64.whl:
Publisher:
pip.yml on fprime-community/fpp-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fprime_fpp_format-3.3.9-py3-none-macosx_11_0_arm64.whl -
Subject digest:
3e7ae675231cb8308c2c1d6409258429fe64361a6a09576201eb7b5521083707 - Sigstore transparency entry: 2541166366
- Sigstore integration time:
-
Permalink:
fprime-community/fpp-tools@f6384aa8454da78ea481f9687ce203080927c975 -
Branch / Tag:
refs/tags/v3.3.9 - Owner: https://github.com/fprime-community
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pip.yml@f6384aa8454da78ea481f9687ce203080927c975 -
Trigger Event:
release
-
Statement type: