I need get the label text for each feature in a points layer. I can read feature attribute using:
layer = QgsProject.instance().mapLayersByName('layer_name')[0]
features = layer.getFeatures(QgsFeatureRequest())
for f in features:
attribute=f.['field_name']
but I need the label text (result of a expresion), it's diferent from attribute.