# Change value of material emission strength from Python console or script

I need to programatically modify the value of Material > Surface(Emission) > Strength

When I change this value manually the output is: bpy.context.space_data.context = 'DATA' bpy.data.node_groups["Shader Nodetree"].nodes["Emission"].inputs[1].default_value = 1.2

But this command produces an error on the console:

>>> bpy.data.node_groups["Shader Nodetree"].nodes["Emission"].inputs[1].default_value = 2
Traceback (most recent call last):
File "<blender_console>", line 1, in <module>


I also tried accessing a surface attribute of the material but this doesn't work either:

>>> bpy.data.materials['light_emit.002'].surface
Traceback (most recent call last):
File "<blender_console>", line 1, in <module>
AttributeError: 'Material' object has no attribute 'surface'


Besides, where can I find the api reference to try solve these problems by myself in the future?

bpy.data.materials['material_name'].node_tree.nodes["Emission"].inputs[1].default_value = 3 #or any other value