How can I get a random number that is constant per object in a driver?
The normal Python way

As @Mike Pan says, in the regular Python you would use a stable value (like location) and use it as a seed. This allows to get a random-like but predictable result.

def get_random_value():
    import random
    seed = obj.location.x + obj.location.y + obj.location.z
    result = random.Random( seed ).random()
    return result


If the seed remains the same, you will get the same result.
By default in Python, the current time is used as the seed. That's why the results are different each frame.

If you need to do it in a driver

You will have less control, but it's possible too :)
Use http://www.blender.org/documentation/blender_python_api_2_71_release/mathutils.noise.html#mathutils.noise.noise

noise.noise( (x,y,z) )


It gives you a result between 0.0 and 1.0, using Perlin noise by default. Imagine it as a value from a Clouds-type texture at a given pixel position. You have to provide the position as a tuple (x,y,z).

Then you can multiply the result by whatever you want.