I know this is a very specific use case, but maybe the answer could be useful for other people who want to automate rendering large batches of cameras in Blender.
In another program I generated mesh geometries that resemble the shape of blenders camera objects. Now I'm looking for a way to convert these mesh "pyramids" to actual camera objects in Blender.
One would have to extract the vertex coordinate of the "pyramid's tip", the direction it is pointing and the distance, then use this information + a global orientation (positive Z direction) for creating a camera object.
Ideally also the aspect ratio of the pyramid's single quad face would be extracted and used for the rendering aspect ration, but this cannot be set in the camera object's properties as far as I know.
Maybe someone with more knowledge of bpy can lead me in the right direction.