# Interfacing Fortran with Python in 2025

**URL:** <https://fortran-lang.discourse.group/t/interfacing-fortran-with-python-in-2025/9244>\
**Category:** Uncategorized\
**Created:** [February 24, 2025, 12:27pm UTC](https://fortran-lang.discourse.group/t/interfacing-fortran-with-python-in-2025/9244 "2025-02-24T12:27:19Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![hkvzjal](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/hkvzjal/32/3055_2.png) [@hkvzjal](https://fortran-lang.discourse.group/u/hkvzjal)\
**Post date:** [February 24, 2025, 1:15pm UTC](https://fortran-lang.discourse.group/t/interfacing-fortran-with-python-in-2025/9244/4 "2025-02-24T13:15:33Z")

</div>

> [@fracton](#):
>
> C with fortran using iso\_c\_binding

You would always need to maintain some amount of extra code. The question is, how much freedom do you want to keep or are willing to give away. I’ve been personally disappointed by the restrictions of automagical tooling, so at the end, since already a few years, I decided to go the `ctypes` way with `Fortran`+`iso_c_binding`, no need to write intermediate C code, you can check a micro example here [Optimization Without Using Derivatives: the PRIMA Package, its Fortran Implementation, and Its Inclusion in SciPy - #19 by hkvzjal](https://fortran-lang.discourse.group/t/optimization-without-using-derivatives-the-prima-package-its-fortran-implementation-and-its-inclusion-in-scipy/5798/19)

---

_[View the full topic](https://fortran-lang.discourse.group/t/interfacing-fortran-with-python-in-2025/9244)._
