Skip to main content

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

Project description

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

Project details


Download files

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

Source Distribution

currencies-2020.12.12.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

currencies-2020.12.12-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file currencies-2020.12.12.tar.gz.

File metadata

  • Download URL: currencies-2020.12.12.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for currencies-2020.12.12.tar.gz
Algorithm Hash digest
SHA256 400cf313b8f6f33a59dcc9c9723dbe458eb8ff18a74ad2b79eba8a295a44b556
MD5 ae82fefa81054a2f93eb744dece86afc
BLAKE2b-256 3918e80ee8222771fdd35c9dfdb97c5d758eaad2d58a56e506d43736a476722b

See more details on using hashes here.

Provenance

File details

Details for the file currencies-2020.12.12-py3-none-any.whl.

File metadata

  • Download URL: currencies-2020.12.12-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for currencies-2020.12.12-py3-none-any.whl
Algorithm Hash digest
SHA256 33b017bd11b0a70707ffa917e80cd8c4e07a1a6b412239ee19c10f145ed5f031
MD5 8c3e4f9d60a351bd70886b50fe7c72a3
BLAKE2b-256 c40f98b4efae4f0e39dfa9d434cb8b4b55e547eff290ab5b752d10f38f8ba376

See more details on using hashes here.

Provenance

Supported by

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