Skip to main content

Provides Currency and Money classes for use in your Python code.

Project description

Build Status Latest PyPI version https://readthedocs.org/projects/py-moneyed/badge/?version=latest

Overview

The need to represent instances of money frequently arises in software development, particularly any financial/economics software. To address that need, the py-moneyed package provides the classes of Money and Currency, at a level more useful than just using Python’s Decimal class, or ($DEITY forbid) the float primitive. The package is meant to be stand-alone and used directly, or be subclassed further. py-moneyed is BSD-licensed.

Quick start

To install:

pip install py-moneyed

Use:

from moneyed import Money, USD

five_dollars = Money(5, USD)

You then use Money objects as if they were numbers, and they behave sensibly. See docs for more information (or the docs/ folder).

History

Some of the py-moneyed code was first derived from python-money available via this URL: http://code.google.com/p/python-money/ Due to inactivity, it was forked by @limist in 2010 and later moved to the py-moneyed organization.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for py-moneyed, version 2.0
Filename, size File type Python version Upload date Hashes
Filename, size py_moneyed-2.0-py3-none-any.whl (11.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size py-moneyed-2.0.tar.gz (20.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page