money-py3


Namemoney-py3 JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://github.com/Feverup/money-py3
SummaryModern Python 3.9+ Money Class with Currency Exchange
upload_time2025-08-18 02:01:20
maintainerFever
docs_urlNone
authorCarlos Palol
requires_python>=3.9
licenseMIT
keywords money currency exchange decimal financial
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Money-Py3: Modern Python Money Library

A modern Python 3.9+ money handling library with currency exchange support and optional locale-aware formatting.

This is a modernized fork of the original [`money`](https://github.com/carlospalol/money) package by **Carlos Palol**, completely rewritten for Python 3.9+ with all Python 2 compatibility code removed.

## Features

- **Python 3.9+ only** - Modern, clean codebase
- **Decimal precision** - No floating-point arithmetic errors
- **Currency exchange** - Extensible exchange rate backends
- **Locale-aware formatting** - Optional CLDR formatting via Babel
- **Immutable objects** - Thread-safe money objects
- **Type hints ready** - Modern Python development

## Installation

### Using pip:
```bash
pip install money-py3
```

For locale-aware formatting support:
```bash
pip install money-py3[formatting]
```

### Using Poetry:
```bash
poetry add money-py3
```

For locale-aware formatting support:
```bash
poetry add money-py3[formatting]
```

## Quick Start

```python
from money import Money, XMoney, xrates
from money.exchange import SimpleBackend
from decimal import Decimal

# Basic usage
price = Money('10.50', 'USD')
tax = Money('0.98', 'USD')
total = price + tax
print(total)  # USD 11.48

# Currency exchange
xrates.install(SimpleBackend)
xrates.base = 'USD'
xrates.setrate('EUR', Decimal('0.85'))

eur_total = total.to('EUR')
print(eur_total)  # EUR 9.76

# XMoney with automatic conversion
x1 = XMoney('10', 'USD')
x2 = XMoney('5', 'EUR')  
result = x1 + x2  # Automatically converts EUR to USD
print(result)  # USD 15.88
```

## Requirements

- Python 3.9+
- `packaging` (automatically installed)
- `babel` (optional, for formatting)

## License

MIT License - see original project for details.

## Credits

This package is based on the original [`money`](https://github.com/carlospalol/money) library by **Carlos Palol** (carlos.palol@awarepixel.com), modernized for Python 3.9+.

### Original Project
- **Author**: Carlos Palol
- **Original Repository**: https://github.com/carlospalol/money
- **License**: MIT

### Modernization by Fever
This modernized version is maintained by **Fever** (https://github.com/feverup/).

**Changes made**:
- Removed all Python 2 compatibility code (six library)
- Updated to use modern Python 3.9+ features
- Replaced deprecated imports with current alternatives
- Improved packaging configuration
- Updated dependencies to current versions

**Contact**: engineering@feverup.com
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Feverup/money-py3",
    "name": "money-py3",
    "maintainer": "Fever",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "engineering@feverup.com",
    "keywords": "money, currency, exchange, decimal, financial",
    "author": "Carlos Palol",
    "author_email": "carlos.palol@awarepixel.com",
    "download_url": "https://files.pythonhosted.org/packages/f6/64/4f9f91b86540f93f0d31e22b057fd7ebe41d35a84fe539f166b4e80d8e02/money_py3-2.0.0.tar.gz",
    "platform": null,
    "description": "# Money-Py3: Modern Python Money Library\n\nA modern Python 3.9+ money handling library with currency exchange support and optional locale-aware formatting.\n\nThis is a modernized fork of the original [`money`](https://github.com/carlospalol/money) package by **Carlos Palol**, completely rewritten for Python 3.9+ with all Python 2 compatibility code removed.\n\n## Features\n\n- **Python 3.9+ only** - Modern, clean codebase\n- **Decimal precision** - No floating-point arithmetic errors\n- **Currency exchange** - Extensible exchange rate backends\n- **Locale-aware formatting** - Optional CLDR formatting via Babel\n- **Immutable objects** - Thread-safe money objects\n- **Type hints ready** - Modern Python development\n\n## Installation\n\n### Using pip:\n```bash\npip install money-py3\n```\n\nFor locale-aware formatting support:\n```bash\npip install money-py3[formatting]\n```\n\n### Using Poetry:\n```bash\npoetry add money-py3\n```\n\nFor locale-aware formatting support:\n```bash\npoetry add money-py3[formatting]\n```\n\n## Quick Start\n\n```python\nfrom money import Money, XMoney, xrates\nfrom money.exchange import SimpleBackend\nfrom decimal import Decimal\n\n# Basic usage\nprice = Money('10.50', 'USD')\ntax = Money('0.98', 'USD')\ntotal = price + tax\nprint(total)  # USD 11.48\n\n# Currency exchange\nxrates.install(SimpleBackend)\nxrates.base = 'USD'\nxrates.setrate('EUR', Decimal('0.85'))\n\neur_total = total.to('EUR')\nprint(eur_total)  # EUR 9.76\n\n# XMoney with automatic conversion\nx1 = XMoney('10', 'USD')\nx2 = XMoney('5', 'EUR')  \nresult = x1 + x2  # Automatically converts EUR to USD\nprint(result)  # USD 15.88\n```\n\n## Requirements\n\n- Python 3.9+\n- `packaging` (automatically installed)\n- `babel` (optional, for formatting)\n\n## License\n\nMIT License - see original project for details.\n\n## Credits\n\nThis package is based on the original [`money`](https://github.com/carlospalol/money) library by **Carlos Palol** (carlos.palol@awarepixel.com), modernized for Python 3.9+.\n\n### Original Project\n- **Author**: Carlos Palol\n- **Original Repository**: https://github.com/carlospalol/money\n- **License**: MIT\n\n### Modernization by Fever\nThis modernized version is maintained by **Fever** (https://github.com/feverup/).\n\n**Changes made**:\n- Removed all Python 2 compatibility code (six library)\n- Updated to use modern Python 3.9+ features\n- Replaced deprecated imports with current alternatives\n- Improved packaging configuration\n- Updated dependencies to current versions\n\n**Contact**: engineering@feverup.com",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Modern Python 3.9+ Money Class with Currency Exchange",
    "version": "2.0.0",
    "project_urls": {
        "Bug Reports": "https://github.com/Feverup/money-py3/issues",
        "Documentation": "https://github.com/Feverup/money-py3#readme",
        "Homepage": "https://github.com/Feverup/money-py3",
        "Original Project": "https://github.com/carlospalol/money",
        "Repository": "https://github.com/Feverup/money-py3",
        "Source": "https://github.com/Feverup/money-py3"
    },
    "split_keywords": [
        "money",
        " currency",
        " exchange",
        " decimal",
        " financial"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "97cd7fcbdb7f6c12ff497fd7cb3d32145a71b955ea938235baa8f8784ebe00bf",
                "md5": "5a1b4f9676c5efbcbbe87e1e495e3346",
                "sha256": "e15b2e92f3f1ca4aafb83a992ddb7cb17b98a00919a51a6f37f85d918a0a892b"
            },
            "downloads": -1,
            "filename": "money_py3-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5a1b4f9676c5efbcbbe87e1e495e3346",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 13479,
            "upload_time": "2025-08-18T02:01:19",
            "upload_time_iso_8601": "2025-08-18T02:01:19.175340Z",
            "url": "https://files.pythonhosted.org/packages/97/cd/7fcbdb7f6c12ff497fd7cb3d32145a71b955ea938235baa8f8784ebe00bf/money_py3-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f6644f9f91b86540f93f0d31e22b057fd7ebe41d35a84fe539f166b4e80d8e02",
                "md5": "e3a21c2b6b36ab2b71719129eec64f74",
                "sha256": "bc5a22badf6154b6957b0016bb8721d5034422ea7e968b5f52156cde21d23f3e"
            },
            "downloads": -1,
            "filename": "money_py3-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e3a21c2b6b36ab2b71719129eec64f74",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 11030,
            "upload_time": "2025-08-18T02:01:20",
            "upload_time_iso_8601": "2025-08-18T02:01:20.531694Z",
            "url": "https://files.pythonhosted.org/packages/f6/64/4f9f91b86540f93f0d31e22b057fd7ebe41d35a84fe539f166b4e80d8e02/money_py3-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-18 02:01:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Feverup",
    "github_project": "money-py3",
    "github_not_found": true,
    "lcname": "money-py3"
}
        
Elapsed time: 0.93900s