How to use the tabpy.tabpy_server.app.util.parse_pwd_file function in tabpy

To help you get started, we’ve selected a few tabpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tableau / TabPy / tabpy / tabpy_server / app / app.py View on Github external
def _parse_pwd_file(self):
        succeeded, self.credentials = parse_pwd_file(
            self.settings[ConfigParameters.TABPY_PWD_FILE]
        )

        if succeeded and len(self.credentials) == 0:
            logger.error("No credentials found")
            succeeded = False

        return succeeded
github tableau / TabPy / tabpy / utils / user_management.py View on Github external
def main():
    logging.basicConfig(level=logging.DEBUG, format="%(message)s")

    parser = build_cli_parser()
    args = parser.parse_args()
    if not check_args(args):
        parser.print_help()
        return

    succeeded, credentials = parse_pwd_file(args.pwdfile)
    if not succeeded and args.command != "add":
        return

    if args.password is None:
        args.password = generate_password()

    process_command(args, credentials)
    return