Skip to main content

Python Currencies

Display money format and its filthy currencies, for all money lovers out there.

Build Status https://codecov.io/gh/Alir3z4/python-currencies/branch/master/graph/badge.svg?token=Ag25YMSuEX

Installation

currencies is available on PyPi

http://pypi.python.org/pypi/currencies

So easily install it by pip

$ pip install currencies

Or by easy_install

$ easy_install currencies

Another way is by cloning currencies’s git repo

$ git clone git://github.com/Alir3z4/python-currencies.git

Then install it by running:

$ python setup.py install

Usage

Displaying money format:

>>> from currencies import Currency
>>>
>>> currency = Currency('USD')
>>> currency.get_money_format(13)
>>> '$13'
>>> currency.get_money_format(13.99)
>>> '$13.99'
>>> currency.get_money_format('13,2313,33')
>>> '$13,2313,33'
>>>
>>> # Displaying with currency as well
>>>
>>> currency.get_money_with_currency_format(13)
>>> '$13 USD'
>>> currency.get_money_with_currency_format(13.99)
>>> '$13.99 USD'
>>> currency.get_money_with_currency_format('13,2313,33')
>>> '$13,2313,33 USD'

Tests

currencies is well tested, to run the test suite:

$ PYTHONPATH=$PYTHONPATH:. python setup.py test

Available currencies

  • AED

  • AFN

  • ALL

  • AMD

  • ANG

  • AOA

  • ARS

  • AUD

  • AWG

  • AZN

  • BAM

  • BBD

  • BDT

  • BGN

  • BHD

  • BND

  • BOB

  • BRL

  • BSD

  • BTN

  • BWP

  • BYR

  • BZD

  • CAD

  • CHF

  • CLP

  • CNY

  • COP

  • CRC

  • CZK

  • DKK

  • DOP

  • DZD

  • EGP

  • ETB

  • EUR

  • FJD

  • GBP

  • GEL

  • GHS

  • GMD

  • GTQ

  • GYD

  • HKD

  • HNL

  • HRK

  • HUF

  • IDR

  • ILS

  • INR

  • ISK

  • JEP

  • JMD

  • JOD

  • JPY

  • KES

  • KGS

  • KHR

  • KRW

  • KWD

  • KYD

  • KZT

  • LBP

  • LKR

  • LTL

  • LVL

  • MAD

  • MDL

  • MGA

  • MKD

  • MMK

  • MNT

  • MOP

  • MUR

  • MVR

  • MXN

  • MYR

  • MZN

  • NAD

  • NGN

  • NIO

  • NOK

  • NPR

  • NZD

  • OMR

  • PEN

  • PGK

  • PHP

  • PKR

  • PLN

  • PYG

  • QAR

  • RON

  • RSD

  • RUB

  • RWF

  • SAR

  • SCR

  • SEK

  • SGD

  • STD

  • SYP

  • THB

  • TND

  • TRY

  • TTD

  • TWD

  • TZS

  • UAH

  • UGX

  • USD

  • UYU

  • VEF

  • VND

  • VUV

  • WST

  • XAF

  • XBT

  • XCD

  • XOF

  • XPF

  • ZAR

  • ZMW


Source

https://github.com/Alir3z4/python-currencies

Website

http://alir3z4.github.com/python-currencies

Issues

https://github.com/Alir3z4/python-currencies/issues

PyPi

http://pypi.python.org/pypi/currencies

Author

Alireza Savand

License

GNU GPL 3

Metadata

Release files for currencies 2020.12.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for currencies 2020.12.12
File Size Uploaded
currencies-2020.12.12.tar.gz 21.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for currencies 2020.12.12
File Interpreter ABI Platform
currencies-2020.12.12-py3-none-any.whl Python 3 none any Details

Total release size: 40.9 kB

Release files / currencies-2020.12.12.tar.gz

Download URL currencies-2020.12.12.tar.gz
Size 21.2 kB
Tags Source
SHA-256 checksum
How to use checksums
400cf313b8f6f33a59dcc9c9723dbe458eb8ff18a74ad2b79eba8a295a44b556
BLAKE2b-256 checksum
How to use checksums
3918e80ee8222771fdd35c9dfdb97c5d758eaad2d58a56e506d43736a476722b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

Release files / currencies-2020.12.12-py3-none-any.whl

Download URL currencies-2020.12.12-py3-none-any.whl
Size 19.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33b017bd11b0a70707ffa917e80cd8c4e07a1a6b412239ee19c10f145ed5f031
BLAKE2b-256 checksum
How to use checksums
c40f98b4efae4f0e39dfa9d434cb8b4b55e547eff290ab5b752d10f38f8ba376
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

Release history Release notifications | RSS feed

This release

2020.12.12 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page