Using Python to manipulate in-game objects

Hello folks, I intend to use the python language to manipulate objects in the game. For example, the player opens a python terminal during the game and can use methods like, moveForward (), turnLeft (), turnRight () to control an object. This example is simple, but I intend to create more interesting challenges. I have already tried using CPython API, but it is complicated and makes the code difficult to maintain. There is Cython, which seems to be simple and useful. Has anyone used Cython and could give me hints on how to use it in the Engine. Or if there is any other way to solve this problem.