The Python interface with Maxima in Sage is pretty sophisticated in that it uses ECL (Embedded Common Lisp) to provide a high performance C level interface. The conversion code (for special functions, constants, etc.), is also nontrivial. Over the years we have tried to reduce the reliance on Maxima (eg for portability reasons) by instead seeing if we could use SymEngine or sympy or something else, but Maxima is pretty deep, eg it’s symbolic integration is still not easy to beat with sympy…