Customizable Ball Socket Mounting Plate
This generic ball socket design can be customized to snap onto the end of any ball fitting, and provides a flat mounting surface to attach objects using double sided tape, adhesive, etc.
This particular STL included was design to mount a Seek thermal camera to coolant hose so it can be positioned easily. The mounting pad attaches to a USB adapter which is needed to connect the thermal camera to a PC.
You may need to tweak the ballClearance and openingAngle to get the right amount of friction when rotating, and also the amount of force to snap into place or remove.
I printed my part in PETG which does not warp/shrink perceptibly when the part cools, and found that 0.35mm clearance gave a reasonable fit. Other plastics or printers with different tolerances may require more clearance for a good fit.