Although i'd recommend using drivers for that, transfering values can also easily be done through scripts - the important part is correctly identifying the node to access.
#read values from the empty
source_empty_name = "SourceEmpty"
source_empty = bpy.data.objects[source_empty_name]
location = source_empty.location
rotation = source_empty.rotation_euler
scale = source_empty.scale
# identify the mapping node of your material
target_material_name = "DynamicMapping"
target_material = bpy.data.materials.get(target_material_name)
target_node_name = "MappingPython"
target_node_type = "MAPPING"
for node in target_material.node_tree.nodes:
if node.type == target_node_type and node.label == target_node_name:
# set values
node.inputs["Location"].default_value = location
node.inputs["Rotation"].default_value = rotation
node.inputs["Scale"].default_value = scale
This requires assigning the right names to your empty, the material, and the mapping node.
The downside of using a script is that you have to manually trigger it if you want the node to update. There are ways to trigger it on updates, but this is not a "clean" way.