There are two other models that I liked, but each one had a minor shortcoming that made them unusable for my needs, so I combined them into one:
My remix basically merges the two, except the mounting studs have holes for M2.5 screws, which (in my opinion) seems to be the perfect size for Raspberry Pi screw holes. The holes are snug but not too tight, so a M2.5 should go in with minimal effort, but repeated threading might bore them out.
I printed these in ABS with 3 walls/shells and 20% infill, so they're light but not flimsy.
Also included is a f3d file for Fusion 360, with the hole size parameterized so you can tweak the model for a different screw size. The outer diameter of the studs will adjust automatically with the hole size.
NOTE: The retaining tab can snap off if you use too much force. It might even break if you don’t use too much force. A more flexible filament than ABS might be better.
30 July 2023 – I noticed the tab where the USB plug sits was a bit too thick, so larger micro-USB plugs would be difficult to line up without causing strain on the USB jack. I dropped the height by 1mm, but I would still recommend using USB cables with very low-profile plugs. I also added a parameter in the f3d file so that you can adjust the thickness if needed.
The author remixed this model.