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:

&gt;&gt;&gt; bpy.data.node_groups["Shader Nodetree"].nodes["Emission"].inputs[1].default_value = 2
Traceback (most recent call last):
  File "&lt;blender_console&gt;", line 1, in &lt;module&gt;
KeyError: 'bpy_prop_collection[key]: key "Shader Nodetree" not found'


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

&gt;&gt;&gt; bpy.data.materials['light_emit.002'].surface
Traceback (most recent call last):
  File "&lt;blender_console&gt;", line 1, in &lt;module&gt;
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?
Found a solution:

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


Thanks to this reference