What you are looking for is a universal hash function.
Many hashing algorithms use a random number internally that can be used to generalize them to a universal hash function.
You can also use any integer hash function and then multiply with a random integer larger than 0 before the modulus reduction.
Depending on how well the values before hashing are distributed and how well the hash values need to be distributed this is probably entirely sufficient:
from functools import partial
from random import randint
def hash_family(value,n,salt): # output is [0,n) (i.e. excluding n)
value=value*(2*salt+1) # multiplying with 0 is bad
value=value^(value>>(n.bit_length()//2)) # xorshift to improve distribution
value=value&((1<<n.bit_length())-1) # cut off high bits for speed
value=value*(2*salt+1) # another multiplication
value=value^(value>>(n.bit_length()//2)) # another xorshift
value=value&((1<<n.bit_length())-1) # cut off high bits
value=value%n # modulus reduction
return value
random_hash = partial(hash_family,salt=randint(0,2**64))
>>> hash_family(23,100,56)
73
>>> hash_family(23,100,57)
52
>>> hash_family(23,100,58)
30
>>> random_hash(17,100)
42
For cryptographic strength use pythons hashlib, many of the hash functions there have a salt parameter that can be set with randint and bound using partial to use it as a universal hash function. Range reduction can be done with the modulo operation.