How to use the mintapi.api.Mint.create function in mintapi

To help you get started, we’ve selected a few mintapi 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 mrooney / mintapi / mintapi / api.py View on Github external
# If keyring option is specified, save the password in the keyring
        keyring.set_password('mintapi', email, password)

    if options.accounts_ext:
        options.accounts = True

    if not any([options.accounts, options.budgets, options.transactions,
                options.extended_transactions, options.net_worth]):
        options.accounts = True

    if options.session_path == 'None':
        session_path = None
    else:
        session_path = options.session_path

    mint = Mint.create(email, password,
                       mfa_method=options.mfa_method,
                       session_path=session_path,
                       headless=options.headless,
                       imap_account=options.imap_account,
                       imap_password=options.imap_password,
                       imap_server=options.imap_server,
                       imap_folder=options.imap_folder,
                       )
    atexit.register(mint.close)  # Ensure everything is torn down.

    if options.imap_test:
        mfa_code = mint.get_email_code(options.imap_account, options.imap_password, options.imap_server, imap_folder=options.imap_folder, debug=1, delete=0)
        print("MFA CODE:", mfa_code)
        sys.exit()

    data = None
github mrooney / mintapi / mintapi / api.py View on Github external
def get_budgets(email, password):
    mint = Mint.create(email, password)
    return mint.get_budgets()
github mrooney / mintapi / mintapi / api.py View on Github external
def get_accounts(email, password, get_detail=False):
    mint = Mint.create(email, password)
    return mint.get_accounts(get_detail=get_detail)
github mrooney / mintapi / mintapi / api.py View on Github external
def get_accounts(email, password, get_detail=False):
    mint = Mint.create(email, password)
    return mint.get_accounts(get_detail=get_detail)