objects = bpy.context.selected_objects
for obj in objects:
obj.active_material_index = 0
for i in objects:
obj.data.use_auto_smooth = 1
obj.data.auto_smooth_angle = math.radians(180)
Select all objects to be smoothed (in the outliner or the viewport), right click in the 3D viewport and pick Shade Smooth from the context menu. Your active object has to be a mesh to get the right context menu. I believe this also works from the Object Menu.
But from your description it sounds like you might have a more complex setup? You can use the Data Transfer modifier to add/multiply/subtract/mix/replace normals from a source object onto your target (Face Corner Data → Custom Normals). The Blender manual actually has an example file demonstrating this. Then you can select all objects, make the one with the new modifier your active, and CTRL-L to copy modifiers. If you have more than one live modifier on your object and don’t want to copy them all, the bundled add-on Copy Attributes Menu lets you pick individual ones.