Set Freestyle line thickness using python script
If you mouse over a field in blender it, amongst other things, gives you the script path



bpy.data.scenes["Scene"].render.line_thickness


For most scripts we use context.  If we are in scene "Scene" it is the context scene, rather than look it up from bpy.data.scenes

import bpy
from bpy import context # for testing
scene = context.scene
#set line thickness to 2.0
scene.render.line_thickness = 2.0


Or in the python console, where C = bpy.context for convenience.

&gt;&gt;&gt; C.scene.render.line_thickness
1.0

&gt;&gt;&gt; C.scene.render.line_thickness = 3.0