This is a Cabinet Safety Lock for Babies.
This was originally from https://www.thingiverse.com/thing:1125208 but I did not like his spring design, it broke VERY quickly no matter what material I made it out of. So I decided to make my own version and incorporate an actual spring. BUT I didn't want to go buy springs. So I made a version using springs that almost EVERYONE already has in their house or they can get at their local pharmacy or store.
Did you guess where you're going to get the springs from yet?
If you guessed mechanical pencils, YOU WIN THE PRIZE!!! YAY!!!!
If you remove the tip of the standard mechanical pencil and break off the "mouth" of it, you can slide out the shaft (giggity) and it will have a lovely little spring on the tip.
I've used these springs for MANY projects because we have dozens upon dozens of mechanical pencils in the house. I'll include pictures for the not so mechanically inclined ;) (crap....I guess I am a dad now)
The last suggestion I have is just add a tiny bit of super glue to each corner to make sure your little dude/gal doesn't defeat the lock by smashing it open and swallow the parts.
The longer hasp is too long for my printer and will require the pieces be glued together.