{"id":23773,"library":"fypp","title":"fypp","description":"Fypp is a Python-powered Fortran preprocessor. It is a tool for generating Fortran source code from template files using a Python-like macro language. The current version is 3.2, with moderate release cadence (major versions every few years).","status":"active","version":"3.2","language":"python","source_language":"en","source_url":"https://github.com/aradi/fypp","tags":["preprocessor","fortran","template","code-generation"],"install":[{"cmd":"pip install fypp","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"fypp is a command-line tool, not typically imported as a library.","symbol":"fypp","correct":"import fypp"}],"quickstart":{"code":"# fypp is used as a command-line tool, not typically imported.\n# Example: run 'fypp -o output.f90 input.fpp'","lang":"bash","description":"Quickstart: process a template file with fypp."},"warnings":[{"fix":"Consult the changelog: https://github.com/aradi/fypp/releases/tag/3.0","message":"Version 3.0 introduced backwards incompatibilities in macro syntax and variable handling. Upgrade requires reviewing templates.","severity":"breaking","affected_versions":">=3.0"},{"fix":"Use parentheses for macro calls: @:macro(args)","message":"The old macro call syntax (e.g., @:func()) is deprecated in favour of Fortran-friendly calls (e.g., @:func(...)).","severity":"deprecated","affected_versions":">=3.0"},{"fix":"Use --file-var-root to control the root for relative paths.","message":"The _FILE_ and _THIS_FILE_ variables are now relative to the file-var-root; may change output paths.","severity":"gotcha","affected_versions":">=3.2"},{"fix":"Run from command line: fypp -o output input","message":"fypp is not a Python library to import; it is a command-line preprocessor. Attempting to import fypp in Python code will not work as expected.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Provide output file: fypp -o output.f90 input.fpp","cause":"Missing output filename after -o flag.","error":"fypp: error: argument -o/--output: expected one argument"},{"fix":"Use the command line: fypp --help","cause":"fypp is installed but not importable as a regular Python module (it's a script).","error":"import fypp\nModuleNotFoundError: No module named 'fypp'"},{"fix":"Upgrade fypp: pip install --upgrade fypp","cause":"Using --file-var-root with fypp < 3.2.","error":"fypp: error: unrecognized arguments: --file-var-root"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}