genpass

Random password generator and its Alfred Script Filter entry point.

Charset design:

  • lowercase + uppercase + digits + symbols (!%@#&^*)

  • minus visually-confusing characters: 0, 1, l, I, o, O

Policy: every accepted password must contain at least one character from each of the four classes (lower, upper, digit, symbol) and must start with a letter — hand-typeable, mixed-class, and unambiguous when read aloud.

afwf_genpass.genpass.is_valid_password(password: str) bool[source]

Check that password satisfies the four-class + starts-with-letter policy.

afwf_genpass.genpass.random_password(length: int) str[source]

Generate one random password of length chars; retries until valid.

afwf_genpass.genpass.gen_passwords(length: int) ScriptFilter[source]

Return a ScriptFilter of n_password fresh passwords of length.

afwf_genpass.genpass.main(query: str) ScriptFilter[source]

Alfred entry point. query parses as int in [min_length, max_length], otherwise an error item is shown.