https://github.com/null-none/money-decimal2text
Python script which convert number in text
https://github.com/null-none/money-decimal2text
Last synced: about 1 year ago
JSON representation
Python script which convert number in text
- Host: GitHub
- URL: https://github.com/null-none/money-decimal2text
- Owner: null-none
- License: mit
- Created: 2015-08-18T19:55:33.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-31T07:40:54.000Z (over 9 years ago)
- Last Synced: 2025-02-26T21:19:26.624Z (about 1 year ago)
- Language: Python
- Homepage: https://pypi.python.org/pypi/money-decimal2text
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
##########
money-decimal2text
##########
Convert money decimal to text
.. image:: https://badge.fury.io/py/money-decimal2text.svg
:target: https://pypi.python.org/pypi/money-decimal2text
=======
Install
=======
.. code-block:: bash
pip install money-decimal2text
=======
Example
=======
.. code-block:: python
from money_decimal2text.script import decimal_to_text
import decimal
int_units = ((u'рубль', u'рубля', u'рублей'), 'm')
exp_units = ((u'копейка', u'копейки', u'копеек'), 'f')
print decimal_to_text(decimal.Decimal('302.19'), int_units=int_units, exp_units=exp_units)
# триста два рубля девятнадцать копеек
=======
License
=======
MIT