This source code was found on BitcoinTalk.org. It has been modified to use SystemRandom() to generate secure Bitcoin mini private keys.
Change the value of GenerateKeys(numKeys = 21): to set how many keys to generate per run (set to 21 by default)
Usage:
python minikey.py