@jonathankampia , were you able to first confirm that you can control the gimbal using the actuator test in QGC for the pwm channel 5 (make sure to remove propellers for testing, just in case)? it should work just like any other pwm channel, i am assuming you already have channels 1-4 already set up and working with ESCs?
If PWM actuator test is working through QGC, then you have VOXL2 IO board set up correctly and the rest of the logic for actually driving the pwm signal should be the same as for regular PX4 drone (which does not use VOXL).
At the end of the day, the VOXL2 IO driver receives 8 channel values from the mixer and just sends the desired pwm values out to the VOXL2 IO board. All the logic above the mixer is standard PX4 and if you have a question about that, you can also try the PX4 forum (since we are not necessarily the best PX4 experts).
You can try your python script, make sure propellers are off until you know exactly what you are doing and are ready to fly 🙂
Alex