Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
A simple library to convert the currency of one country to other, it supports 153 countries' 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
To install the library run the below command (This will also install requests
)
pip install google-currency
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"
}
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.
FAQs
A simple library to convert the currency of one country to other, it supports 153 countries' currency
We found that google-currency demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.