Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

A python library to convert currency using Google Finance.

Project description

PyCurrency-Converter

https://travis-ci.org/SiddharthSaxena/PyCurrency-Converter.svg?branch=master https://img.shields.io/badge/pypi-v1.0-orange.svg?maxAge=3600&&style=flat https://img.shields.io/badge/version-v1.0-red.svg?maxAge=3600&&style=flat https://img.shields.io/badge/license-GPL--3.0-blue.svg?maxAge=3600&&style=flat

A python library to convert currency using Google Finance.

Installation

For Python 2 users:

>>> pip install PyCurrency-Converter

For Python 3 users:

>>> pip3 install PyCurrency-Converter

Alternatively you can install git clone this repository and install it via setup.py.

>>> git clone https://github.com/SiddharthSaxena/PyCurrency-Converter.git
>>> python setup.py install

Dependencies

BeautifulSoup

>>> sudo pip install bs4

urllib

>>> sudo pip install urllib

Usage

Import

>>> import PyCurrency_Converter

Get currency codes

>>> import PyCurrency_Converter
>>> PyCurrency_Converter.codes()
United Arab Emirates Dirham (AED)
Afghan Afghani (AFN)
Albanian Lek (ALL)
Armenian Dram (AMD)
Netherlands Antillean Guilder (ANG)
Angolan Kwanza (AOA)
Argentine Peso (ARS)
Australian Dollar (A$)
Aruban Florin (AWG)
Azerbaijani Manat (AZN)
Bosnia-Herzegovina Convertible Mark (BAM)
Barbadian Dollar (BBD)
Bangladeshi Taka (BDT)
Bulgarian Lev (BGN)
Bahraini Dinar (BHD)
Burundian Franc (BIF)
Bermudan Dollar (BMD)
Brunei Dollar (BND)
Bolivian Boliviano (BOB)
Brazilian Real (R$)
Bahamian Dollar (BSD)
Bitcoin (฿)
Bhutanese Ngultrum (BTN)
Botswanan Pula (BWP)
BYN (BYN)
Belarusian Ruble (BYR)
Belize Dollar (BZD)
Canadian Dollar (CA$)
Congolese Franc (CDF)
Swiss Franc (CHF)
Chilean Unit of Account (UF) (CLF)
Chilean Peso (CLP)
CNH (CNH)
Chinese Yuan (CNĽ)
Colombian Peso (COP)
Costa Rican Colón (CRC)
Cuban Peso (CUP)
Cape Verdean Escudo (CVE)
Czech Republic Koruna (CZK)
German Mark (DEM)
Djiboutian Franc (DJF)
Danish Krone (DKK)
Dominican Peso (DOP)
Algerian Dinar (DZD)
Egyptian Pound (EGP)
Eritrean Nakfa (ERN)
Ethiopian Birr (ETB)
Euro (€)
Finnish Markka (FIM)
Fijian Dollar (FJD)
Falkland Islands Pound (FKP)
French Franc (FRF)
British Pound (Ł)
Georgian Lari (GEL)
Ghanaian Cedi (GHS)
Gibraltar Pound (GIP)
Gambian Dalasi (GMD)
Guinean Franc (GNF)
Guatemalan Quetzal (GTQ)
Guyanaese Dollar (GYD)
Hong Kong Dollar (HK$)
Honduran Lempira (HNL)
Croatian Kuna (HRK)
Haitian Gourde (HTG)
Hungarian Forint (HUF)
Indonesian Rupiah (IDR)
Irish Pound (IEP)
Israeli New Sheqel (₪)
Indian Rupee (₹)
Iraqi Dinar (IQD)
Iranian Rial (IRR)
Icelandic Króna (ISK)
Italian Lira (ITL)
Jamaican Dollar (JMD)
Jordanian Dinar (JOD)
Japanese Yen (Ľ)
Kenyan Shilling (KES)
Kyrgystani Som (KGS)
Cambodian Riel (KHR)
Comorian Franc (KMF)
North Korean Won (KPW)
South Korean Won (₩)
Kuwaiti Dinar (KWD)
Cayman Islands Dollar (KYD)
Kazakhstani Tenge (KZT)
Laotian Kip (LAK)
Lebanese Pound (LBP)
Sri Lankan Rupee (LKR)
Liberian Dollar (LRD)
Lesotho Loti (LSL)
Lithuanian Litas (LTL)
Latvian Lats (LVL)
Libyan Dinar (LYD)
Moroccan Dirham (MAD)
Moldovan Leu (MDL)
Malagasy Ariary (MGA)
Macedonian Denar (MKD)
Myanmar Kyat (MMK)
Mongolian Tugrik (MNT)
Macanese Pataca (MOP)
Mauritanian Ouguiya (MRO)
Mauritian Rupee (MUR) .......

Get exchange rate

>>> import PyCurrency_Converter
>>> PyCurrency_Converter.convert(1, 'USD', 'INR')
68.8122 INR

General Format

>>> import PyCurrency_Converter
>>> PyCurrency_Converter.convert(amount, from, to)

License

GNU General Public License v3 (GPLv3). See the LICENSE file for full details.

Visit http://siddharthsaxena.weebly.com/pycurrency-converter.html for more details.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Files for PyCurrency-Converter, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size PyCurrency-Converter-1.0.py2.7.egg (5.5 kB) File type Egg Python version 2.7 Upload date Hashes View
Filename, size PyCurrency_Converter-1.0-py2.py3-none-any.whl (3.7 kB) File type Wheel Python version any Upload date Hashes View
Filename, size PyCurrency-Converter-1.0-py2.py3.tar.gz (15.7 kB) File type Source Python version None Upload date Hashes View
Filename, size PyCurrency-Converter-1.0-py2.py3.zip (21.5 kB) File type Source Python version None Upload date Hashes View
Filename, size PyCurrency-Converter-1.0.py3.4.egg (5.6 kB) File type Egg Python version 3.4 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