You can look into PyMC’s find_constrained_prior() function and see if that helps.
find_constrained_prior()