Minecraft has an API. If you run your own server you can program it from Python.
See All 251 Episodes of "Graham King"