Per How to generate a repeatable random number sequence? it's possible to set the state of the random module such that you can expect the subsequent calls to randint to return the same number.
One limitation I see with this approach is that the state is set at the module level (essentially a global variable) so it seems impossible to create several streams/iterators of random numbers that would be repeatable (but the streams' calls can be interleaved arbitrarily) with the current mechanism. Are there any workarounds/alternatives libraries to that would enable this?