It's hard to find project boxes with just the exact dimensions you need and even harder to cut square holes in the them. This OpenSCAD generated model is parameterized in width, depth, height and wall thickness. Set the dimensions you want.
Add holes, cutouts, vias all over for the switches, LEDs and displays your project wants.
I'm assembling them with ½" #4 stainless steel screws. Screw size is adjustable too!
I printed some examples in PLA and PETG.
Update: I added a PowerSwitchTail replacement enclosure to show how modifications can be done right in the SCAD.
Update: Added STL for an enclosure sized for a Raspberry Pi Zero with a HAT.
The author marked this model as their own original creation.