Skip to main content

Generates a random password.

Project description

Generates a random password. Can be used as a stand-alone CLI program or imported into projects.


python install

pip install pypw


pypw -l 20 - Generate a random password that is 20 characters long pypw -s "TurnTh1sIntoMyP4ssW()RD" --no-mixed - Generate a password from -s without mixed casing pypw -h - Display the help screen


pypw.RandomPassword(sequence=None, mixedCases=True)
    sequence(str): The string you want to create a password from
    mixedCases(bool): Generate mixed casing on letters

    returns: <pypw.RandomPassword instance>

        returns: True/False

        - Randomizes the casing on a string or list

        sequence(str/list): The string to randomize casing on

        returns: List of characters

    generateRandomPW(length=None, alpha=True, digits=True, symbols=True)
        - Generate a random password chosen by PyPW

        length(int): Defines how many characters you want in the generated password
        alpha(bool): Choose to use alphabetical characters in randomly generated password or not
        digits(bool): Choose to use digits (0-9) in randomly generated password or not
        symbols(bool): Choose to use symbols in randomly generated password or not

        returns: Dict with result, score, ranking and phonetic

        - Generate password from the arguments passed to RandomPassword

        returns: Dict with result, score, ranking and phonetic

        - Generate a 'phrase' to (hopefully) help the user remember the password. (Not guaranteed to make sense!)

        sequence(str): The string you want to generate a phonetic phrase on

        returns: Str

        - Calculate the strength of the password based on length, digits, symbols and casing

        returns: Tuple

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypw-1.0.0.tar.gz (3.9 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page