A python library to encrypt/decrypt passwords. It wraps up Blowfish, but it works with any password length, without being multiple of 8.
>>> from edpwd import encrypt
>>> encrypt('s3cr3t_k3y', 'p4ssw0rd1!')
'cfZ3qDo2UUkLDLOe/PiBRQ=='
>>> from edpwd import decrypt
>>> decrypt('s3cr3t_k3y', 'cfZ3qDo2UUkLDLOe/PiBRQ==')
'p4ssw0rd1!'
>>> from edpwd import random_string
>>> random_string(40, digits=True, letters=True, punctuation=True)
>>> 'PF"DZ(\\T]j8|j<s>S#K%`[b;wI66LU,nl:st1%H1'