A long time ago I had some fun with Minecraft Pi Edition. It was a cut down version of pocket edition exclusively for the Raspberry Pi, with an official Python API: https://minecraft.wiki/w/Pi_Edition
It's long discontinued, and apparently doesn't work on recent versions of Raspbian, but there is a current modded version which apparently still works (I haven't tested): https://gitea.thebrokenrail.com/minecraft-pi-reborn/minecraf...
There's also a (discontinued) Bukkit/Spigot plugin called RaspberryJuice which makes the same Python API work with a real Java edition server: https://dev.bukkit.org/projects/raspberryjuice
And there's also a currently maintained Bukkit/Spigot plugin called FruitJuice: https://github.com/jdeast/FruitJuice
Back in the day I made a basic version of Minesweeper which you could play inside Minecraft Pi Edition using the Python API: https://bitbucket.org/dwales/minesweeper-for-minecraft-pi-ed...
This blog showcased a bunch of Minecraft + Python projects: https://mcpipy.wordpress.com/
Also No Starch Press has a book which uses this Python API: https://nostarch.com/programwithminecraft