Scripting 3D Viewport mode how to

how do you set up the 3D viewport mode

i need to set either Top or front view for the 3D viewport
in a Panel addon depending on a checkbox parameter

thanks
happy bl