The secret module is accessible via the paste.script.util module.
Return a string of the given length. Uses os.urandom if it can, or just pseudo-random numbers otherwise.
Returns a random string of the given length. The string is a base64-encoded version of a set of random bytes, truncated to the given length (and without any newlines).
See the source for more information.