Skip to main content

Python library for currency exchange.

Project description

Project Portfolio: https://github.com/calebyhan/CalebHan

currency-ch

Python library for currency exchanges.

All rates originated from FloatRates.

Installation


Use the package manager pip to install currency-ch.

pip install currency-ch

Usage


import currency



# converts amount of money from one currency to another

currency.convert("usd", "eur", 1)



# returns rate from one currency to another

currency.rate("usd", "eur")

Documentation


currency.convert(input_currency, output_currency, amount, roundTo)

Converts input_currency of amount (default 1) to output_currency with rounded to roundTo decimal places (default 2).

currency.rate(input_currency, output_currency)

Returns rate of converting input_currency to output_currency.

Contributing


Pull requests are welcome. For major changes, please open an issue first

to discuss what you would like to change.

Please make sure to update tests as appropriate.

License


MIT

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

currency-ch-0.0.2.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

currency_ch-0.0.2-py3-none-any.whl (2.5 kB view hashes)

Uploaded Python 3

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