Change all metallic value with python
￼Shamelessly modified from:
Automatically change the properties of multiple materials
import bpy
for mat in bpy.data.materials:
    if not mat.use_nodes:
        mat.metallic = 1
        continue
    for n in mat.node_tree.nodes:
        if n.type == 'BSDF_PRINCIPLED':
            n.inputs[&quot;Metallic&quot;].default_value = 1