Skip to main content

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.

Project details


Release history Release notifications | RSS feed

This version

0.5

Download files

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

Source Distribution

python-money-0.5.tar.gz (14.9 kB view details)

Uploaded Source

File details

Details for the file python-money-0.5.tar.gz.

File metadata

  • Download URL: python-money-0.5.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for python-money-0.5.tar.gz
Algorithm Hash digest
SHA256 d98114d1895534fae37f1d4f44df25828c25e6c5a9298e1ec343cbcc6290f4e9
MD5 3f450ad092022ccc68869d50a1ba03fc
BLAKE2b-256 8cbbb24ed78d62b2463d46c182698c64636424c0761f9a84008572983b06f5d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page