def start(cls): """Run starting commands need sql to run""" User.table_setup() if User.do_select().where( User.is_admin == True).count() == 0: # noqa E712 password = cls.generate_password() with open(File.location("adminpasssword"), "w") as f: f.write(password) User.insert(username="******", password=cls.__password_encryption(password), is_admin=True).execute()
def get_users() -> list: """Grab the users info""" return User.do_select(User.id, User.username, User.is_admin)