This is a battery holder for 3 double A batteries. It is a test to get all the dimensions right so that I can use the design in my robotics projects.
The design is based around Keystone Electronics parts (5221, 5212, 5222) available on mouser.com (among others).
Print the thing. Solder wires to the 5221 and 5222. Snap the parts into position as shown in the picture (two 5212s in the larger slots, the 5221/5222 in smaller slots). Make sure there is a spring opposite each button.
In this version, the wire holes are a little small. Use the holes as a pilot to drill to a size that fits your desired wire size.
I got data sheets for the AA batteries and battery terminals. I designed the solid models in Solidworks. I made a bunch of experimental prints and dinked with the parameters until everything fit. Saved it as an STL and printed using my flashforge creator pro with black abs thread.