Here is some openSCAD code that can be used to create handrails and stanchions.
The code is still underdevelopment.

To use you can either create and 3d model for a single stanchion or the code can be used to create a single modle multiple stanchions and handrails.

Currently limited to a single style of stanchion and cylindrical handrails.

The first image shows what is generated by the default openSCAD code.

No STLs are currently provided as these would depend on usage.