wkutils 0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
wkutils/__init__.py ADDED
@@ -0,0 +1,4 @@
1
+ from wkutils import twoDecimalPlaces
2
+ from wkutils import gross_payment
3
+ from wkutils import net_payment
4
+ from wkutils import calculate_loan_payments
wkutils/wkutils.py ADDED
@@ -0,0 +1,23 @@
1
+ import numpy_financial as npf
2
+
3
+
4
+ def twoDecimalPlaces(answer):
5
+ '''
6
+ This simply formats the input as two decimal places.
7
+ '''
8
+ return("%.2f" % answer)
9
+
10
+ def gross_payment(rate, nper, pv):
11
+ '''
12
+
13
+ '''
14
+ return float(twoDecimalPlaces(npf.pmt(rate/(nper*12), nper*12, pv)))
15
+
16
+ def net_payment(grosspayment):
17
+ return float(twoDecimalPlaces(grosspayment * (1-0.3693)))
18
+
19
+ def calculate_loan_payments(rate, nper, pv):
20
+ gp = gross_payment(rate, nper, pv)
21
+ np = net_payment(gp)
22
+ print('Gross payment:', gp)
23
+ print('Net payment:', np)
@@ -0,0 +1,17 @@
1
+ Metadata-Version: 2.1
2
+ Name: wkutils
3
+ Version: 0.0.1
4
+ Summary: Useful utilities for python
5
+ Author: Werner Kruger
6
+ Author-email: <python@wkruger.com>
7
+ Keywords: python,utilities,financial,calculator
8
+ Classifier: Development Status :: 1 - Planning
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Operating System :: Unix
12
+ Classifier: Operating System :: MacOS :: MacOS X
13
+ Classifier: Operating System :: Microsoft :: Windows
14
+ Description-Content-Type: text/markdown
15
+ Requires-Dist: numpy-financial
16
+
17
+ A package that contains a bunch of useful utilities I have collected over the years
@@ -0,0 +1,6 @@
1
+ wkutils/__init__.py,sha256=_niOWoszyd3Wy5rNo5hVnKuuGOi97txpvUqAjBdiu34,147
2
+ wkutils/wkutils.py,sha256=nzB3cV-ch4gJUbWGTGHpPuyE7dhbrxPEL5WVSD1dID4,566
3
+ wkutils-0.0.1.dist-info/METADATA,sha256=9cdF8t3Ya4IwhNFpr8zykwR9mRE9Bn7a6aBIlyra6bY,627
4
+ wkutils-0.0.1.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
5
+ wkutils-0.0.1.dist-info/top_level.txt,sha256=3PRroc-4V5mG1teLajmK8WlM70Uuzbde2kSHA9rb9-s,8
6
+ wkutils-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.41.2)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ wkutils