Personal Capital + Python = Pipelined personal finance
Use your existing Personal Capital login credentials to pull the JSON data directly, allowing you to perform any custom analyses you wish to. The API calls can be found by viewing the HTTP calls the browser makes after login.
This library pulls the data into a Mongo database to enable local analysis. See entry.py.
Documentation can be found at the github pages here
personal-capital-plus is tested to work under Python 3.x. See the requirements via the following command:
cat requirements.txt
personal-capital-plus is currently available on the PyPi's repository and you can install it via pip:
pip install -U personal-capital-plus
If you prefer, you can clone it and run the setup.py file. Use the following commands to get a copy from GitHub and install all dependencies:
git clone https://github.com/aagnone3/personal-capital-plus.git
cd personal-capital-plus
pip install .
Or install using pip and GitHub:
pip install -U git+https://github.com/aagnone3/personal-capital-plus.git
Now, to avoid a 2FA prompt each run, set the following environment variables:
export PEW_EMAIL=<your_personal_capital_email>
export PEW_PASSWORD=<your_personal_capital_password>
If you plan to use the update option of pc_api, set the following variable, indicating the URL the POST to with a derived JSON payload. The payload is currently customized for my own needs, but trace entry.py to go about changing it for yourself.
export PEW_PAYLOAD_URL=<destination_payload_url>
With the environment defined, give it a whirl:
# only available if you've installed it
pc_api update
# otherwise, use this
PYTHONPATH=${PYTHONPATH:-}:${PWD} python personalcapital/tools/entry.py update
make test
The Makefile
, .travis.yml
file and .ci
directory contain the structure necessary to have Travis test the repository upon all branch updates. Some additional steps, however, are needed:
- Enable the repository to be monitored by Travis via your Travis profile.
- Generate a Github app token, and assign it to the (private) environment variable
${GITHUB_TOKEN}
in the Travis environment.