Skip to main content

Google currency

Disclaimer: This package fetch the result from Google using web scrapping. Owner will not be responsible for any misuse of this package. This is solely for the purpose of learning.

A very simple currency converter.

It can convert the currency of 153 codes.

Since the results are fetched from Google directly, you can trust the results :-D

Installation

To install the library run the below command (This will also install requests)

  • pip install google-currency

Usage

from google_currency import convert  

# Converted without comma like 70000.00 
convert('usd', 'inr', 1000) 

# Converted amount with comma like 70,000.00
convert('usd', 'inr', 1000)

This will return a JSON response like below

{  
	 "converted": true, 
	 "from": "USD", 
	 "to": "INR", 
	 "amount": "74876.00"
}

{  
	 "converted": true, 
	 "from": "USD", 
	 "to": "INR", 
	 "amount": "74,876.00"
}    

Response description

  • converted: Boolean indicating whether the amount is converted or not, if this is false than it means the
    currency code is not valid and the amount is not converted and it will be equal to 0.

  • amount: Converted amount

  • from: Currency code from which the amount is converted.

  • to: Currency code to which the amount is converted.

Metadata

Release files for google-currency 1.0.10

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

Source distribution (sdist)

Source distribution for google-currency 1.0.10
File Size Uploaded
google_currency-1.0.10.tar.gz 5.8 kB Details

Release files / google_currency-1.0.10.tar.gz

Download URL google_currency-1.0.10.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b6c7488fc8fa0b24c9c9c27487b4f061e9a78596dbb45b4bbf1cf0f4174a73ba
BLAKE2b-256 checksum
How to use checksums
d00b49ebba0bd4f798d99680fda4180cb1d9ec92c26e5b5cc7f4f1c27e5e9efc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.9

Release history Release notifications | RSS feed

This release

1.0.10 This release

1 release file

1.0.9

2 release files

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

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