Simple 2D spaceship game made in python with pygame. Made about four years ago.
I was just getting a handle on decent game loops and python at the time, so there could be some gnarly anti-patterns in there.
It is expecting the music Observing the Star found for free at https://opengameart.org/content/another-space-background-track
As I recall the ship thrusts based on the mouse curson, both in the direction towards the cursor, and with thrust proportional to the distance of the cursor from the ship. ... Upon reviewing the code I think you use the arrow keys. I don't remember.