Examples of random() in custom distribution?

You should make use of the rng. Scipy rvs methods accept it under the kwarg random_state IIRC.

You can also pass size to the rvs method, always nice even if you plan to only sample scalar distributions