This was created for my kids to play with, but in reality it was more of a design challenge than anything else.
The lock is “fully functional” in the sense that it can only be opened with the key that belongs to it. The only hardware you need is a spring from a pen, all other parts are printed.
This design is one of the most popular projects I’ve published on Printables.
You can find the files for this model here: https://www.printables.com/model/239591-fully-functional-padlock