https://www.postgresql.org/docs/current/plpython.html
Naturally Rust or C functions will still be faster.