You can use the CustomDisplay class (example here) for rendering non-shaded stuff (e.g. curves and vectors). Or override DrawViewportMeshes
and DrawViewportWires
(with the GHPython component set to SDK mode) for rendering all sorts of things, like so:
200401_GHPython_DrawViewportWires_02.gh (16.6 KB)
This is just my first stab at implementing the latter method. As far as I call tell, one probably ought set the bounding box as well (Edit: For frustum culling, as explained here by Giulio).