Git Product home page Git Product logo

amazon-ynab's Introduction

Amazon YNAB Reconciler

Getting Started

You need to have the following information:

  • Amazon Account Email
  • Amazon Account Password
  • YNAB API Key (You can find how to get yours here)
  • Payee name and ID to be used to patch the transactions on Amazon (see instructions below)

๐Ÿ‘‰ You will also need Chrome or the Chromium webdriver installed.

Run the application with

python3 -m amazon_ynab --init

This will prompt you for the information. Data will be saved by default on the working directory under .env/secrets.yml. To change the location, and see other options, run

python3 -m amazon_ynab --help

To run the application after initialization, run

python3 -m amazon_ynab run

The options available for the run command are:

  • --headless: Run the application in headless mode.
  • --days-back [INT]: Scrape the last [INT] days of transactions.
  • --short-items: Shorten names of items to fit in the YNAB table.
  • --words-per-item [INT]: Shorten names of items to fit in the YNAB table.

Screenshots

Init Application Run

To obtain the Payee ID and Name

  1. On your YNAB budget, create a Payee for Amazon if you don't have one, or would like to use a new one.
  2. Go to the YNAB API and click on Authorize on the top right of the page. Input your YNAB API key in the field provided and click on Authorize.
  3. Scroll down to Payees, there should be a box /budgets/{budget_id}/payees. Select it, click on Try it out, input your Budget ID on budget_id (you can also use last-used insted of the ID), and click on Execute.
  4. Scroll down to where it says Response Body. You should see a list of Payees. Look for the Amazon payee you want to use to save the reconciled transactions (overwriting the existing import payee for each transaction). Copy the ID and name and use them to initialize the application.

Troubleshooting

Sometimes the application fails to reconcile the transactions. In most cases this will be because YNAB doesn't show the automatically imported transactions on the API without some manual intervention. To fix this, you can go to your YNAB budget and for each of your accounts click on View at the top like the image below:

Secrets File Structure

amazon:
    password: <YOUR_AMAZON_PASSWORD>
    username: <YOUR_AMAZON_EMAIL>
ynab:
    token: <YOUR_YNAB_API_TOKEN>
    amazon_payee_id: <YOUR_AMAZON_PAYEE_ID>
    amazon_payee_name: <YOUR_AMAZON_PAYEE_NAME>

Credits

Projects

This project is heavily inspired from the following project: AmazonSyncForYNAB

Project Structure ๐Ÿš€ Your next Python package needs a bleeding-edge project structure.

This project was generated with python-package-template


amazon-ynab's People

Contributors

dependabot[bot] avatar sbarrios93 avatar sbarriosr avatar

Stargazers

Gregory Beck avatar  avatar Andrew Ferguson avatar Lucas Howard avatar Andrew Burks avatar Adam Keslo avatar Colin Mason avatar Erik Schwartz avatar Randy Miller avatar

Watchers

Andrew Ferguson avatar  avatar

Forkers

fnmeyer akeslo

amazon-ynab's Issues

object is unexpectedly None

This is awesome and was working great however as of late I'm running into the below error

๐Ÿ› Bug Report


amazon_ynab/utils/utils.py:62 in not_none 

โ”‚   59 โ”‚   if obj is None:                                                            โ”‚
โ”‚   60 โ”‚   โ”‚   if message is not None:                                                โ”‚
โ”‚   61 โ”‚   โ”‚   โ”‚   raise TypeError(message)                                           โ”‚
โ”‚ โฑ 62 โ”‚   โ”‚   raise TypeError("object is unexpectedly None")                         โ”‚
โ”‚   63 โ”‚   return obj                                                                 โ”‚
โ”‚   64                                                                                โ”‚
โ”‚   65                                                                                โ”‚
โ”‚                                                                                     โ”‚
โ”‚ โ•ญโ”€โ”€โ”€โ”€ locals โ”€โ”€โ”€โ”€โ•ฎ                                                                  โ”‚
โ”‚ โ”‚ message = None โ”‚                                                                  โ”‚
โ”‚ โ”‚     obj = None โ”‚  

๐Ÿ”ฌ How To Reproduce

Steps to reproduce the behavior:

python3 -m amazon_ynab run

Environment

MAC OSX

Screenshots

image

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.