Just annotate a certain C++ in the pxd function to use as "wrap-as-str" and implement 10 lines of code generation. Using << operator might be hard since they might be defined outside the class somewhere. https://github.com/OpenMS/OpenMS/pull/7265