Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

UNKNOWN

Project description

Build Status codecov.io

A simple interface to work with money-related entities.

Installation

The current stable release:

pip install simple_money

or:

easy_install simple_money

or from source:

$ sudo python setup.py install

Usage

Arithmetic operations:

>>> Money(100, 'EUR') + Money(50, 'EUR')
150 EUR
>>> Money(100, 'EUR') - Money(50, 'EUR')
50 EUR
>>> Money(100, 'EUR') * 2
200 EUR

Also you can manipulate with money in different currencies:

>>> Money(100, 'EUR') + Money(50, 'USD')
100 EUR, 50 USD
>>> Money(100, 'EUR') - Money(50, 'USD')
100 EUR, -50 USD
>>> (Money(100, 'EUR') - Money(50, 'USD')) * 2
200 EUR, -100 USD

With multiply currencies you are able to get concrete currency value in the following way:

>>> value = Money(100, 'EUR') + Money(50, 'USD')
>>> value.EUR
100 EUR
>>> value.USD
50 EUR

Download files

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

Files for simple-money, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size simple_money-0.1.1-py2.py3-none-any.whl (5.6 kB) File type Wheel Python version 3.5 Upload date Hashes View
Filename, size simple-money-0.1.1.tar.gz (4.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page