If you are on c++ there is boost python. It wraps the CPyyhon api in a good way with lots of nice stuff like automatic ref counting, function definitions and data type conversions.
https://www.boost.org/doc/libs/1_72_0/libs/python/doc/html/t...
https://www.boost.org/doc/libs/1_72_0/libs/python/doc/html/b...