passwordler.generate_password

Module Contents

Functions

generate_password([length, include_symbols, ...])

Generate a password.

passwordler.generate_password.generate_password(length=12, include_symbols=True, include_numbers=True)[source]

Generate a password.

This function creates a random password containing a mix of upper and lower case letters, numbers, and symbols. The inclusion of numbers and symbols can be controlled through parameters.

Parameters: length (int): The length of the password to be generated. Default is 12 characters. include_symbols (bool): Whether to include symbols in the password. Default is True. include_numbers (bool): Whether to include numbers in the password. Default is True.

Returns: str: A randomly generated password.

Example: >>> generate_password() Output: ‘,tKC]m”wDJ34’ >>> generate_password(include_symbols=False, include_numbers=False) Output: ‘NJfVKhgnrJYa’