writer.add_metadata(metadata)
from qgis.core import QgsGeometry, Qgs3DRenderContext, Qgs3DMapScene pyqgis programmer 39s guide 3 pdf work
The is an authoritative resource by Gary Sherman, designed to help developers transition to and master the QGIS 3.x API using Python 3 . Core Content and Structure writer