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 USD
Metadata
Release files for simple-money 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simple-money-0.1.2.tar.gz | 4.3 kB | Without provenance | Details for simple-money-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simple_money-0.1.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for simple_money-0.1.2-py2.py3-none-any.whl |
Total release size: 9.9 kB
Release files / simple-money-0.1.2.tar.gz
| Download URL | simple-money-0.1.2.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2124bb9863ec80080dc66ef28569f17c0eb5f319ec7fa782ad45b06590ad4ef
|
|
BLAKE2b-256 checksum How to use checksums |
92a9b05265a3adcc80c50d04c99d24b03c61b271c26c780e448acc1f1804ce41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / simple_money-0.1.2-py2.py3-none-any.whl
| Download URL | simple_money-0.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
2d2f67c67cbf57268ff609b66f7aac7f9da83c15e2dfc2a902e0697b7beb0a64
|
|
BLAKE2b-256 checksum How to use checksums |
b5febe56eab3ce96a07e2a5d48403693f470352d1f6f7e9f1294aede3dee6fde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for simple-money 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.