Computing a cumulative distribution function in Python
If I understand you correctly, these can be found in scipy.stats. scipy has a long list of different distributions that you can use, both continuous as well as multivariate and discrete. All distribution functions have an underlying cdf method which allows you to calculate the cumulative distribution functions of that specific distribution. Using the Chi-squared distribution from your example would look as follows:
from scipy.stats import chi2

chi2.cdf(x=30, df=50)
# 0.011164780271550276

Using other distributions is as simple as importing that distribution and using the cdf method as shown above.