This is a place to get a small Python file that will let you write code that will control Minecraft (Windows 10 version not Java).
There are other ways to control Minecraft with code. See here: https://minecraft.makecode.com
Download and run Minecraft for Windows.
Download and run Code Connection.
Take the string that comes out of Code Connection and put it in the game (the example below is mine I just got out of the game, yours will look different).
/connect 199.254.146.175:19131
See here for how to start Code Connection and Minecraft https://minecraft.makecode.com/setup
Or here https://education.minecraft.net/support/knowledge-base/connecting-code-connection-minecraft/
block names here: https://www.minecraftinfo.com/idnamelist.htm
Other tips If you ever need to know your coordinates do this in the game /tp ~ ~ ~
Feel free to contact me for questions on twitter! @tonetheman