Skip to content

cdragos/pyledger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyLedger

Python script that reads a ledger and gets the account balance for a given user and for a specific date.

Requirements

Installation

  1. $ docker-compose build
  2. $ docker-compose up -d
  3. $ docker exec -ti pyledger-app sh

Usage

Run the python REPL and use the following example:

from src.ledger import Ledger

ledger = Ledger('data/ledger.csv')
# get account balance for an account id to current date
ledger.get_account_balance('john')
# get account balance for an account id for a certain day
ledger.get_account_balance('mary', '2015-01-24')

Run tests

From the docker shell (docker exec -ti pyledger-app sh) run the following command:

py.test

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published