Below you will find information going over each part of your keymap.
Main.py should be a functional main.py from kmk. With the configurable parts wrapped in the correct comments.
# keymap keymap code...
Comments like that tell the Peg client pull out those parts and load them into the app to be changed. With out a comment wrapping something it will at best be over written and at worst stop your keymap from loading into the Peg client.
Layout.json are like settings for the app and let the client know how to save the keymap in the future.