I am using ArcGIS Pro for my map automation. I try to use arcpy.mp module to identify the maps in the current project. I want to export the map into a jpeg image like what we can do via Map Export under Share tab. But I didn't find any relevant methods under map object and as to my research, either layout or MapFrame could have method exportToJPEG. below is my code so far and no layout in my current project.
How can I use Python to convert a map object to MapFrame or layout object for exporting as an image or any other way to achieve my purpose?
aprx =
arcpy.mp.ArcGISProject(r"C:\Users\Documents\ArcGIS\Projects\myProject.aprx")
mps = aprx.listMaps()
lyr = mps[0].listLayers()
aprx.listLayouts()