According to Calculating Polygon Main Angle using QGIS, it is possible to find the main_angle of a polygon by using a field expression like:
main_angle($geometry)
Can this function be called using PyQGIS but not as an expression but from the Python console or script as a way to get the main orientation angle of a polygon?