Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

Data classes to represent Money and Currency types

Project Description

Introduction

python-money provides carefully designed basic Python primitives for working with money and currencies.

The primary objectives of this module is to aid in the development of financial applications by increasing testability and reusability, reducing code duplication and reducing the risk of defects occurring in the code.

The module defines two basic Python classes – a Currency class and a Money class. It also pre-defines all the world’s currencies, according to the ISO 4217 standard. The classes define some basic operations for working with money, overriding Python’s addition, substraction, multiplication, etc. in order to account for working with money in different currencies. They also define currency-aware comparison operators. To avoid floating point precision errors in monetary calculations, the module uses Python’s Decimal type exclusively.

The design of the module is based on the Money enterprise design pattern, as described in Martin Fowler’s “Patterns of Enterprise Application Architecture”.

This project also contains Django helper classes for easy integration with python-money.

Installation

python setup.py install

Project Site

http://code.google.com/p/python-money/

This project is sponsored by A115 Ltd.

Release history Release notifications

This version
History Node

0.5

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
python-money-0.5.tar.gz (14.9 kB) Copy SHA256 hash SHA256 Source None May 16, 2011

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page