Wrt the python package. Scipy has binomial and poisson classes [1,2]. I don't know if these fit the bill?
[1]https://docs.scipy.org/doc/scipy/reference/generated/scipy.s...
[2]https://docs.scipy.org/doc/scipy/reference/generated/scipy.s...
[1]https://docs.scipy.org/doc/scipy/reference/generated/scipy.s...
[2]https://docs.scipy.org/doc/scipy/reference/generated/scipy.s...
[1] https://en.wikipedia.org/wiki/Poisson_binomial_distribution
The attempt to shoehorn in the Python version of the R Fourier variation was closed 18 days ago with a "doesn't quite fit, try again later"
[1]https://en.wikipedia.org/wiki/Poisson_binomial_distribution
[2]https://cran.r-project.org/web/packages/PoissonBinomial/inde...
Looking at some child comments it looks like there have been attempts to get it added to scipy since 2016.