According to my research, neither Python nor C++ high-level APIs provide this flexibility. You should use pjlib directly, which is the core C library.