Table of Contents
generate()
To generate a PIN with PyPassKit, use the generate() function.
import pypassplex as ppx
password = ppx.pingen.generate(8) # the number given as an argument is the PIN length
print(password)Arguments
The generate() function takes one optional argument:
- length (int, default=6) - Controls the total character length of the generated PIN.
entropy()
To determine the PIN entropy with PyPassKit, use the entropy() function.
import pypassplex as ppx
entropy = ppx.pingen.entropy(8) # the number given as an argument is the PIN lengthArguments
The entropy() function takes one optional argument:
- length (int) - The length of the PIN string being evaluated.
Errors
The module raises standard Python exceptions with specific error codes when invalid configurations are provided.
- [236] TypeError Triggered when a non-integer value is passed for the
lengthargument inentropy(). - [237] ValueError Triggered when the integer value passed to
lengthis shorter than 1.
Copyright (c) 2026 LukeS-05
PyPassPlex | LukeS-05 | GitHub | Site License