A python short code generator using predefined string and size . uses basiacally the random and string modules of python .
It is already at PyPi
so just pip install pyshort
import pyshort as ps
print(ps.short())
# define size
print(ps.short(size=7))
# define code
code = 'abcdefghijklmnop'
print(ps.short(code=code))
# define extra
print(ps.short(extra_string='@!#$%^&'))