Wanted to attach a standard handlebar lamp to a basket. I could have designed a complicated sliding mechanism used by my model of the lamp, but decided to go with a much simpler approach of emulating a short piece of handlebar on a separate bracketed object.
Even though I needed this for a lamp, I imagine this can be used for all sorts of accessories: bells, cameras, mirrors, etc.
Included is an openscad design that is fairly customizable. I used 2.5 cm diameter handlebar on a 5 cm extension with a hole for a 5 mm bolt and 10 mm head. All of these values are tweakable in the file.
For printing I used PETG, although the PLA test prints looked quite sturdy as well (however they are not recommended for outside use). I took a generous amount of infill with adding a bit extra around the bolt hole. The object was printed upright to minimize overhangs. A small amount of support was added to the bottom to prevent tipping.
The basket pictured above is painted metal weave. I added a zip-tie to reduce tipping because the material is flexible.
The author hasn't provided the model origin yet.