Driver with random output between a range of values ( -1 to 1)
Noise module is in the driver namespace
For our convenience the mathutils.noise module is  added to the driver namespace by default. As have all members of mathutils and most of math module.
&gt;&gt;&gt; bpy.app.driver_namespace['noise']
&lt;module 'mathutils.noise'&gt;

There are a number of options for randoms, for a simple range (-1.0, 1.0) can type #2 * noise.random() - 1 directly into a non-driven field.  The hash # signifies make this a driver.

after, (good some random in range.

Click within the property can edit it directly (notice no hash since it is already a driver, signified by purple)

Note these values will change randomly for each frame. Remove the driver to &quot;keep&quot; a value.
Using self in drivers
Further to my comment re @Gorgious's answer can use self in drivers.

If the driver is on a modifier then self will be the modifier, self.id_data the object the modifier belongs to.
Simple test script, adds a method test to the driver namespace.  The object the driver is on is passed to the method.  The hash of the object's name is divided by some seed and the remainder returned.
Hash can be either positive or negative, so the values should fall within the range of (-1, 1)
import bpy
from bpy.app import driver_namespace as dns
from math import modf

seed = 203137

def test(ob):
    r = modf(hash(ob.id_data.name) / seed)[0]
    return r

dns[&quot;test&quot;] = test