MCPcopy Create free account
hub / github.com/geekcomputers/Python / gen_sequence

Method gen_sequence

Password Generator/pass_gen.py:7–22  ·  view source on GitHub ↗
(
        conditions,
    )

Source from the content-addressed store, hash-verified

5class PasswordGenerator:
6 @staticmethod
7 def gen_sequence(
8 conditions,
9 ): # must have conditions (in a list format), for each member of the list possible_characters
10 possible_characters = [
11 str.ascii_lowercase,
12 str.ascii_uppercase,
13 str.digits,
14 str.punctuation,
15 ]
16 sequence = ""
17 for x in range(len(conditions)):
18 if conditions[x]:
19 sequence += possible_characters[x]
20 else:
21 pass
22 return sequence
23
24 @staticmethod
25 def gen_password(sequence, passlength=8):

Callers 1

generate_passwordMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected