passgen.passwords.services

This file contains service methods to generate passwords.

Module Contents

Functions

validate_length(length: int) → None

Validate password length.

get_password(length: int, exclude_punctuation: bool = False) → str

Return password.

passgen.passwords.services.validate_length(length: int) None

Validate password length.

Parameters

length (int) – password length

Returns

None

Raises

AssertionError – if length is invalid

passgen.passwords.services.get_password(length: int, exclude_punctuation: bool = False) str

Return password.

Parameters
  • length (int) – password length

  • exclude_punctuation (bool) – generate password without special chars

Returns

password

Return type

str