I needed to put an inline switch in a mains cable. I had the switch, but no housing for it. This is such a housing.
This accommodates an 8mm diameter cable, and a switch requiring a rectangular hole that is 19mm x 13mm (which seems to be a standard size).
Insert the cable from either end. Clip in the switch and solder it up (if you can avoid it, don't break the ground/earth line - have that run through continuously). Put heat-shrink over all joins.
Put cable ties tight round the cables just inside where they go through the box walls and cut off the excess. These are for strain relief on the cables.
Put the lid on the box with four short stubby wood screws. The design is intended for the screws to be self-tapping.