Skip to main content

ffmt

PyPI CI License: MIT GitHub Marketplace Docs

A fast, configurable Fortran formatter with support for Fypp, Doxygen, and OpenACC/OpenMP directives. Written in Rust. Installable via pip.

Documentation | Configuration | Changelog

Installation

pip install ffmt

Or via Cargo:

cargo install ffmt

Quick start

ffmt src/                        # format in-place
ffmt --check src/                # CI mode (exit 1 if changes needed)
ffmt --diff src/                 # show colored diff
ffmt -j 8 src/                   # parallel
cat file.fpp | ffmt -            # stdin/stdout

Features

  • Code -- indentation, whitespace normalization, keyword casing, named ends, line wrapping, operator modernization (.eq. -> ==), double-colon enforcement, trailing semicolon removal, only : -> only:
  • Comments -- rewrapping, inline spacing (S102), !< alignment, !&/& ! cleanup, format suppression (! ffmt off/on)
  • Structure -- blank line management around openers/closers/#ifdef, declaration :: alignment, declaration/use compaction
  • Preprocessor -- Fypp (#:if, $:, @:), C preprocessor (#ifdef), OpenACC (!$acc), OpenMP (!$omp)
  • Opt-in -- multi-statement splitting, assignment alignment, only: alignment, & column alignment, use-statement reformatting

Most options accept true, false, or "preserve". See the configuration reference for all options.

Configuration

Create ffmt.toml or add [tool.ffmt] to pyproject.toml:

indent-width = 4
line-length = 132
keyword-case = "lower"
modernize-operators = true
enforce-double-colon = true

[whitespace]
relational = true
multdiv = false

CI

# GitHub Actions
- uses: sbryngelson/ffmt@latest
  with:
    args: "--check src/"
# pre-commit
repos:
  - repo: https://github.com/sbryngelson/ffmt
    rev: v0.4.5
    hooks:
      - id: ffmt

Other Fortran formatters

Formatter Language Status Notes
fprettify Python Unmaintained Free-form only. Fypp support.
findent C Active Indentation and fixed/free conversion.
Codee Formatter Proprietary Active Commercial. Tree-sitter based.
LFortran fmt Rust In development AST-based.
Fortitude Rust Active Linter with auto-fix.

License

MIT

Metadata

Release files for ffmt 0.5.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 ffmt 0.5.0
File Size Uploaded Provenance Actions
ffmt-0.5.0.tar.gz 122.9 kB With provenance Details for ffmt-0.5.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for ffmt 0.5.0
File Actions
ffmt-0.5.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for ffmt-0.5.0-py3-none-win_amd64.whl
ffmt-0.5.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for ffmt-0.5.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
ffmt-0.5.0-py3-none-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl Python 3 none Linux glibc 2.17+ PowerPC 64-le Details for ffmt-0.5.0-py3-none-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl
ffmt-0.5.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for ffmt-0.5.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
ffmt-0.5.0-py3-none-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64, macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64) Details for ffmt-0.5.0-py3-none-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl

Total release size: 10.9 MB

Release files / ffmt-0.5.0.tar.gz

Download URL ffmt-0.5.0.tar.gz
Size 122.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5f880e495ea6b7fcb421a2221d7e76a7555d116665c9c768af1ca8fb4cad6b12
BLAKE2b-256 checksum
How to use checksums
8ad8b6ae9bb6e9cb940d3d9ef699b188e337676bdd4387511cca32b9d873b9a1
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 14, 2026.

Transparency log

Release files / ffmt-0.5.0-py3-none-win_amd64.whl

Download URL ffmt-0.5.0-py3-none-win_amd64.whl
Size 1.5 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
eb5cd4e591ceb65b3cacfc05771fcd3a4b4979d8514143c7ec4c2d5c647b7ef8
BLAKE2b-256 checksum
How to use checksums
479865a7b8175f9ac5ca70b7b78ee7108c081bd628d0cb5cbb300cea8f1e38be
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 14, 2026.

Transparency log

Release files / ffmt-0.5.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL ffmt-0.5.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.9 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
f34519d2451334eadb0ff40ec001958a1b6eb14fa396575f0f686dd0d4ace35d
BLAKE2b-256 checksum
How to use checksums
d19f24924f351874212cc89a12c65ea5084e1d6fbeafec1e8ed3fd2af1a0fcf0
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 14, 2026.

Transparency log

Release files / ffmt-0.5.0-py3-none-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl

Download URL ffmt-0.5.0-py3-none-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl
Size 2.1 MB
Tags Linux glibc 2.17+ PowerPC 64-le Python 3
SHA-256 checksum
How to use checksums
cd31367d584c778e87f2b886a01dabf280d67ae9c4e1abdb1514c0a3aa410093
BLAKE2b-256 checksum
How to use checksums
c321db5fc67997383ef5cfaf7cce0c592617a8ddc697fc9cde00ef74a42a8d30
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 14, 2026.

Transparency log

Release files / ffmt-0.5.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL ffmt-0.5.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.8 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
8bd978c5aba6c0d2ed77781635ab75934d49363e3ad070fda26492e5dbaf09a0
BLAKE2b-256 checksum
How to use checksums
0e0f2295de6838450d1012f5f6b07506120227c427194512d639261dc4364de9
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 14, 2026.

Transparency log

Release files / ffmt-0.5.0-py3-none-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl

Download URL ffmt-0.5.0-py3-none-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl
Size 3.4 MB
Tags Python 3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3a703fcd19ae1f594767184af9fabf6936a55bbf1fc84de4c0b1644d68c6afbd
BLAKE2b-256 checksum
How to use checksums
62b01ee346033275e10c762d2954b6909d9cf579370904bc291a62a7dcab3c5e
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 14, 2026.

Transparency log

Security for ffmt 0.5.0

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

Select from 6 files

Attestation for ffmt-0.5.0.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 14, 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