Git Product home page Git Product logo

mintapi's Introduction

mintapi

a screen-scraping API for Mint.com. Build Status

Requirements

Ensure you have Python 2 or 3 and pip (easy_install pip) and then:

pip install mintapi

Usage

from Python

From python, instantiate the Mint class (from the mintapi package) and you can make calls to retrieve account/budget information. We recommend using the keyring library for persisting credentials.

import mintapi
mint = mintapi.Mint(email, password)

# Get basic account information
mint.get_accounts()

# Get extended account detail at the expense of speed - requires an
# additional API call for each account
mint.get_accounts(True)

# Get budget information
mint.get_budgets()

# Get transactions
mint.get_transactions() # as pandas dataframe
mint.get_transactions_csv(self, include_investment=False) # as raw csv data
mint.get_transactions_json(self, include_investment=False, skip_duplicates=False):

# Get net worth
mint.get_net_worth()

# Initiate an account refresh
mint.initiate_account_refresh()

There are, additionally, deprecated wrappers for backward compatibility with old versions of the API.

import mintapi
mintapi.get_accounts(email, password)
mintapi.get_accounts(email, password, True)
mintapi.get_budgets(email, password)
mintapi.initiate_account_refresh(email, password)

from anywhere

Run it as a sub-process from your favorite language; pip install mintapi creates a binary in your $PATH. From the command-line, the output is JSON:

usage: mintapi [-h] [--accounts] [--budgets] [--extended-accounts]
               [--transactions] [--filename FILENAME] [--keyring]
               [email] [password]

positional arguments:
  email                 The e-mail address for your Mint.com account
  password              The password for your Mint.com account

optional arguments:
  -h, --help            show this help message and exit
  --accounts            Retrieve account information (default if nothing else
                        is specified)
  --budgets             Retrieve budget information
  --net-worth           Retrieve net worth (as a single float value)
  --extended-accounts   Retrieve extended account information (slower, implies
                        --accounts)
  --transactions, -t    Retrieve transactions
  --filename FILENAME, -f FILENAME
                        write results to file. can be {csv,json} format.
                        default is to write to stdout.
  --keyring             Use OS keyring for storing password information

>>> mintapi --keyring [email protected]
[
  {
    "accountName": "Chase Checking",
    "lastUpdatedInString": "25 minutes",
    "accountType": "bank",
    "currentBalance": 100.12,
    ...
  },
  ...
]

If you need to avoid using pip or setup.py, you can also clone/download this repository and run: python mintapi/api.py

mintapi's People

Contributors

mrooney avatar mcronce avatar danshorstein avatar jbms avatar mark-adams avatar adamgreenhall avatar mplewis avatar wendlinga avatar sherbang avatar brycedrennan avatar ericbuehl avatar yegle avatar barofsoap avatar dancudds avatar

Watchers

James Cloos avatar Adrianna Flores avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.