How to use the plaid2qif.transaction_writer.TransactionWriter function in plaid2qif

To help you get started, we’ve selected a few plaid2qif 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 ebridges / plaid2qif / plaid2qif / transaction_writer.py View on Github external
def begin(self, account_info):
    print( dumps(account_info, sort_keys=True), file=self.output)

  def write_record(self, transaction):
    print( dumps(transaction, sort_keys=True), file=self.output)


class CsvTransactionWriter(TransactionWriter):
  def begin(self, account_info):
    print('Date,Amount,Description', file=self.output)

  def write_record(self, transaction):
    print(transaction['date'],transaction['amount'],transaction['name'], file=self.output)


class QifTransactionWriter(TransactionWriter):
  def begin(self, account):
    print('!Account', file=self.output)
    print('N%s' % account['name'], file=self.output)
    print('T%s' % account['type'], file=self.output)
    if 'description' in account:
      print('D%s' % account['description'], file=self.output)
    print('^', file=self.output)
    print('!Type:%s' % account['type'], file=self.output)


  def write_record(self, transaction):
    print('C', file=self.output) # cleared status: Values are blank (not cleared), "*" or "c" (cleared) and "X" or "R" (reconciled).
    print('D%s' % self.format_date(transaction['date']), file=self.output)
    print('N%s' % self.format_chknum(transaction), file=self.output)
    print('P%s' % transaction['name'], file=self.output)
    print('T%s' % self.format_amount(transaction['amount']), file=self.output)
github ebridges / plaid2qif / plaid2qif / transaction_writer.py View on Github external
def write_record(self, transaction):
    pass

  def end(self):
    pass


class JsonTransactionWriter(TransactionWriter):
  def begin(self, account_info):
    print( dumps(account_info, sort_keys=True), file=self.output)

  def write_record(self, transaction):
    print( dumps(transaction, sort_keys=True), file=self.output)


class CsvTransactionWriter(TransactionWriter):
  def begin(self, account_info):
    print('Date,Amount,Description', file=self.output)

  def write_record(self, transaction):
    print(transaction['date'],transaction['amount'],transaction['name'], file=self.output)


class QifTransactionWriter(TransactionWriter):
  def begin(self, account):
    print('!Account', file=self.output)
    print('N%s' % account['name'], file=self.output)
    print('T%s' % account['type'], file=self.output)
    if 'description' in account:
      print('D%s' % account['description'], file=self.output)
    print('^', file=self.output)
    print('!Type:%s' % account['type'], file=self.output)
github ebridges / plaid2qif / plaid2qif / transaction_writer.py View on Github external
if t == 'raw':
      return JsonTransactionWriter(output)

  instance = staticmethod(instance)

  def begin(self, account_info):
    pass

  def write_record(self, transaction):
    pass

  def end(self):
    pass


class JsonTransactionWriter(TransactionWriter):
  def begin(self, account_info):
    print( dumps(account_info, sort_keys=True), file=self.output)

  def write_record(self, transaction):
    print( dumps(transaction, sort_keys=True), file=self.output)


class CsvTransactionWriter(TransactionWriter):
  def begin(self, account_info):
    print('Date,Amount,Description', file=self.output)

  def write_record(self, transaction):
    print(transaction['date'],transaction['amount'],transaction['name'], file=self.output)


class QifTransactionWriter(TransactionWriter):