I spent quite some time researching this a few years ago. Then I finally programmed and generated my own fully working address. It's quite a satisfying journey. But I have to say, Python makes this somewhat less painful than it is in JavaScript (yes, I tried that too...) xD