# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['dinero', 'dinero.currencies']

package_data = \
{'': ['*']}

setup_kwargs = {
    'name': 'dinero',
    'version': '0.1.1',
    'description': 'Dinero is a library for working with monetary values in Python.',
    'long_description': '# Dinero [alpha]\n\nDinero is a library for working with monetary values in Python.\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import CLP, USD\n\namount = Dinero(234342.3010, USD)\namount.raw_amount\namount.symbol\namount.code\n\nformatted = amount.get_amount(symbol=True, currency=True)\nprint(formatted)\n```\n\n    $234,342.30 USD\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import CLP, USD\n\nunit_price = Dinero(2.32, USD)\nnumber_sold = 3\nmoney_received = 6.96\nif unit_price * number_sold == money_received:\n    print(\'Accounts balanced\')\nelse:\n    raise ValueError(\'Accounts not balanced\')\n```\n\n    Accounts balanced\n\n## Operations\n\n### Add\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import EUR\n\namount = Dinero("333.3", EUR)\ntotal = amount.add(333.3)\nprint(total)\n```\n\n    666.60\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import EUR\n\namount_1 = Dinero("333.3", EUR)\namount_2 = Dinero(333.3, EUR)\n\ntotal = amount_1.add(amount_2)\nprint(total)\n```\n\n    666.60\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import EUR, USD\n\namount_1 = Dinero("333.3", USD)\namount_2 = Dinero(333.3, USD)\n\ntotal = amount_1 + amount_2\nprint(total)\n```\n\n    666.60\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import EUR, USD\n\namount_1 = Dinero("333.3", EUR)\namount_2 = Dinero(333.3, EUR)\namount_3 = Dinero(333.3, EUR)\n\ntotal = sum([amount_1, amount_2, amount_3])\nprint(total)\n```\n\n    999.90\n\n```python\n# different currencies will raise a DifferentCurrencyError\nfrom dinero import Dinero\nfrom dinero.currencies import EUR, USD\nfrom dinero.exceptions import DifferentCurrencyError\n\namount_1 = Dinero("333.3", EUR)\namount_2 = Dinero(333.3, USD)\n\ntry:\n    amount_1.add(amount_2)\n    amount_1 + amount_2\n    sum([amount_1, amount_2])\nexcept DifferentCurrencyError:\n    print(\'Can not operate with different currencies\')\n```\n\n    Can not operate with different currencies\n\n### Subtract\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import EUR\n\namount = Dinero("20.20", EUR)\ntotal = amount.subtract(\'10.20\')\nprint(total)\n```\n\n    10.00\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import EUR\n\namount_1 = Dinero("20.20", EUR)\namount_2 = Dinero("10.20", EUR)\ntotal = amount_1.subtract(amount_2)\nprint(total)\n```\n\n    10.00\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import EUR, USD\n\namount_1 = Dinero("20.20", EUR)\namount_2 = Dinero("10.20", EUR)\ntotal = amount_1 - amount_2\nprint(total)\n```\n\n    10.00\n\n```python\n# different currencies will raise a DifferentCurrencyError\nfrom dinero import Dinero\nfrom dinero.currencies import EUR, USD\nfrom dinero.exceptions import DifferentCurrencyError\n\namount_1 = Dinero("333.3", EUR)\namount_2 = Dinero(333.3, USD)\n\ntry:\n    amount_1.subtract(amount_2)\n    amount_1 - amount_2\nexcept DifferentCurrencyError:\n    print(\'Can not operate with different currencies\')\n```\n\n    Can not operate with different currencies\n\n### Multiply\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import EUR\n\namount = Dinero("20", EUR)\ntotal = amount.multiply(2)\nprint(total)\n```\n\n    40.00\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import EUR\n\namount_1 = Dinero("20.00", EUR)\namount_2 = Dinero("2.0", EUR)\ntotal = amount_1.multiply(amount_2)\nprint(total)\n```\n\n    40.00\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import EUR, CLP\n\namount_1 = Dinero("20.00", EUR)\namount_2 = Dinero("2.0", EUR)\ntotal = amount_1 * amount_2\nprint(total)\n```\n\n    40.00\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import USD\n\namount = Dinero("20.00", USD)\ntotal = amount * 2.9\nprint(total)\n```\n\n    58.00\n\n```python\n# different currencies will raise a DifferentCurrencyError\nfrom dinero import Dinero\nfrom dinero.currencies import EUR, USD\nfrom dinero.exceptions import DifferentCurrencyError\n\namount_1 = Dinero("333.3", EUR)\namount_2 = Dinero(333.3, USD)\n\ntry:\n    amount_1.multiply(amount_2)\n    amount_1 * amount_2\nexcept DifferentCurrencyError:\n    print(\'Can not operate with different currencies\')\n```\n\n    Can not operate with different currencies\n\n### Divide\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import EUR\n\namount = Dinero("20", EUR)\ntotal = amount.divide(2)\nprint(total)\n```\n\n    10.00\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import EUR\n\namount_1 = Dinero("20.00", EUR)\namount_2 = Dinero("2.0", EUR)\ntotal = amount_1.divide(amount_2)\nprint(total)\n```\n\n    10.00\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import EUR\n\namount_1 = Dinero("20.00", EUR)\namount_2 = Dinero("2.0", EUR)\ntotal = amount_1 / amount_2\nprint(total)\n```\n\n    10.00\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import EUR\n\namount = Dinero("20", EUR)\ntotal = amount / 2\nprint(total)\n```\n\n    10.00\n\n```python\n# different currencies will raise a DifferentCurrencyError\nfrom dinero import Dinero\nfrom dinero.currencies import EUR, USD\nfrom dinero.exceptions import DifferentCurrencyError\n\namount_1 = Dinero("20", EUR)\namount_2 = Dinero(2, USD)\n\ntry:\n    amount_1.divide(amount_2)\n    amount_1 / amount_2\nexcept DifferentCurrencyError:\n    print("Can not operate with different currencies")\n```\n\n    Can not operate with different currencies\n\n### Operations\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import EUR\n\namount_1 = Dinero("333.2", EUR)\namount_2 = Dinero(333.3, EUR)\namount_3 = Dinero(333.4, EUR)\n\nhighest = max([amount_1, amount_2, amount_3])\nlowest = min([amount_1, amount_2, amount_3])\n\nprint(highest)\nprint(lowest)\n```\n\n    333.40\n    333.20\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import EUR\n\namount_1 = Dinero("333.2", EUR)\namount_2 = Dinero(333.3, EUR)\n\n# less than\namount_1.less_than(amount_2)\namount_1.less_than(333.3)\namount_1 < amount_2\namount_1 < 333.3\n\n# less than or equal\namount_1.less_than_or_equal(amount_2)\namount_1.less_than_or_equal(333.3)\namount_1 <= amount_2\namount_1 <= 333.3\n\n# greater than\namount_1.greater_than(amount_2)\namount_1.greater_than(333.3)\namount_1 < amount_2\namount_1 < 333.3\n\n# greater than or equal\namount_1.greater_than_or_equal(amount_2)\namount_1.greater_than_or_equal(333.3)\namount_1 > amount_2\namount_1 > 333.3\n\n# equals\namount_3 = Dinero(333.2, EUR)\namount_1.equals_to(amount_3)\namount_1.equals_to(333.2)\namount_1 == amount_3\namount_1 == 333.2\n```\n\n    True\n\n## to_dict\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import USD\n\namount = Dinero("3333.259", USD)\namount.to_dict(amount_with_format=False)\n```\n\n    {\'amount\': \'3333.26\',\n     \'currency\': {\'code\': \'USD\', \'base\': 10, \'exponent\': 2, \'symbol\': \'$\'}}\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import USD\n\namount = Dinero("3333.259", USD)\namount.to_dict(amount_with_format=True)\n```\n\n    {\'amount\': \'3,333.26\',\n     \'currency\': {\'code\': \'USD\', \'base\': 10, \'exponent\': 2, \'symbol\': \'$\'}}\n\n## to_json\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import USD\n\namount = Dinero("3333.2", USD)\namount.to_json(amount_with_format=False)\n```\n\n    \'{"amount": "3333.20", "currency": {"code": "USD", "base": 10, "exponent": 2, "symbol": "$"}}\'\n\n```python\nfrom dinero import Dinero\nfrom dinero.currencies import USD\n\namount = Dinero("3333.2", USD)\namount.to_json(amount_with_format=True)\n```\n\n    \'{"amount": "3,333.20", "currency": {"code": "USD", "base": 10, "exponent": 2, "symbol": "$"}}\'\n',
    'author': 'Carlos Montecinos Geisse',
    'author_email': 'carlos@pythoncheatsheet.org',
    'maintainer': 'None',
    'maintainer_email': 'None',
    'url': 'https://github.com/wilfredinni/dinero',
    'packages': packages,
    'package_data': package_data,
    'python_requires': '>=3.10,<4.0',
}


setup(**setup_kwargs)
