| title | Getting Started |
|---|---|
| description | Install PRIK, set up compilers, and build your first Fortran-to-Python extension |
| audience | users |
| prerequisites | repository checkout |
| related | installation.md, verification.md |
| status | maintained |
| publication | reviewed |
This guide takes you from a fresh clone to your first working Python extension built from Fortran code.
Start with GNU (gfortran and gcc), tested on Linux and macOS. LLVM Flang
is tested on both platforms; Intel IFX is tested on Linux. See
Installation for every compiler option.
Follow these pages in order:
- Installation — Install prik and the required native compilers.
- Verification — Check the package, headers, and compiler.
- Your First Function — Wrap a simple scalar Fortran function.
- Your First Module — Work with Fortran modules and saved state.
- Development Workflow — Learn the edit → review → build → test loop.
In Your First Function, you will create
scale.f90, build it as a Python extension named scale, and call its
scale function:
import numpy as np
import scale
result = scale.scale(np.float64(3.0), np.float64(2.5))
print(result) # 7.5The first example exposes a standalone Fortran function directly on the extension. Later guides show how Fortran modules become Python namespaces and derived types become Python classes.
Ready? Start with Installation.