jochem / currencyconverter

A Python currency converter using the European Central Bank data.

Home Page:http://alexprengere.github.io/currencyconverter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Currency converter

This is a currency converter that uses historical rates against a reference currency (Euro).

Currency sources

The default source is the European Central Bank. This is the ECB historical rates for 42 currencies against the Euro since 1999. It can be downloaded here: eurofxref-hist.zip. The converter can use different sources as long as the format is the same.

Installation

You can install directly after cloning:

Or use the Python package:

Command line example

After installation, you should have currency_converter in your $PATH:

Python API example

Example:

Convert from EUR to USD:

Default target currency is EUR:

Change reference date for rate:

Get a rate:

Fallback mode on not supported dates:

Sometimes rates are missing:

But we also have a fallback mode for those:

Other public members:

Error cases:

About

A Python currency converter using the European Central Bank data.

http://alexprengere.github.io/currencyconverter

License:Apache License 2.0


Languages

Language:Python 98.5%Language:Shell 1.5%