Coder Social home page Coder Social logo

pynab's People

Contributors

aldanor avatar immerrr avatar zergie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pynab's Issues

Its confusing that you can find transactions that aren't in any category

I realise this is an artefact of the way the data is structured but it would be good to have a note in the docs to make people aware of this. IMHO it would be even nicer if when iterating over transactions in a category (or even always) the sub-transactions relevant to said category also appeared in the list just as any other normal transaction.

>>> t = budget.transactions.filter('date', date(2014, 10, 28))[-2]
>>> # t in this case is a transaction with sub transactions (in my budget file)

>>> # t is not in any of the transactions when iterating by category
>>> print any([t in c.transactions for c in budget.categories])
False

>>> print t.category
None

>>> print len(t.sub_transactions)
7

nYNAB

The new YNAB (aka YNAB 5, release imminent) is going to be web-based, with all the data hosted on their servers. Do you have any idea whether this will work with nYNAB?

Unicode characters in category names

£ sign in category names is causing an error in category handling.
Removing the £ sign from category names is a workaround.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/ynab/models.py", line 326, in __str__
    return str(self._elements)
  File "/usr/lib64/python2.7/site-packages/ynab/models.py", line 248, in __repr__
    info += ' ({})'.format(self.category.name)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 16: ordinal not in range(128)

Fix for line of credit

The line of credit account type is mis-capitalized in the AccountType class. Here's a fix:

diff --git a/ynab/models.py b/ynab/models.py
index 6013a3e..9ab79b0 100644
--- a/ynab/models.py
+++ b/ynab/models.py
@@ -17,7 +17,7 @@ class AccountType(Enum):
     SAVINGS = 'Savings'
     CREDIT_CARD = 'CreditCard'
     CASH = 'Cash'
-    LINE_OF_CREDIT = 'LineOfCredit'
+    LINE_OF_CREDIT = 'LineofCredit'
     PAYPAL = 'Paypal'
     MERCHANT_ACCOUNT = 'MerchantAccount'
     INVESTMENT_ACCOUNT = 'InvestmentAccount'

Get category remaining $

Hello,

This project looks great - I am trying to get the remaining $ from a category. Is that possible?

Thank you

Quick and dirty patch for getting transactions from a category

Hi, didn't think it was worth branching just for this. Very quick patch for another bit of functionality, just made it by poking around. See what you think. The methods of Transaction work too. Thanks

diff --git a/ynab/models.py b/ynab/models.py
index 1e0b3b4..4f9bf53 100644
--- a/ynab/models.py
+++ b/ynab/models.py
@@ -182,6 +182,10 @@ class Category(CategoryModel):
     def full_name(self):
         return '{}/{}'.format(self.master_category.name, self.name)

+    @property
+    def transactions(self):
+        return self._ynab.transactions.filter('category', self)
+

 class MasterCategory(CategoryModel):
     _entity_type = schema.MasterCategory

Transactions between end date

In models.py, in transactions.between line 450 produces an error: 'Transaction' object has no attribute 'end'. Should that say t.date?

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.