move timeout logic to python
Merge pull request #24 from SimpleFinance/fix

move timeout logic to python