Restructure code
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import click
|
||||
import subprocess
|
||||
import utils
|
||||
|
||||
@click.group()
|
||||
def cli():
|
||||
9
core/utils.py
Normal file
9
core/utils.py
Normal file
@ -0,0 +1,9 @@
|
||||
import subprocess
|
||||
|
||||
def generate_password() -> str:
|
||||
'''
|
||||
Generates a random password using pwgen for user.
|
||||
Could raise subprocess.CalledProcessError
|
||||
'''
|
||||
result = subprocess.check_output(['pwgen', '-s', '32', '1'])
|
||||
return result.decode().strip()
|
||||
Reference in New Issue
Block a user