Skip to main content

Converts foreign fiat currencies to USD by getting and caching hourly exchanges rates from openexchangerates.org

Project description

PyUSDforex - Fiat to USD

Project Description

PyUSDforex is a python package to convert foreign currencies into US dollars. It uses the free API key from openexchangerates.org to get over 200 currencies. PyUSDforex allows you to perform as many currency conversions as you wish by caching the hourly exchange rates from openexchange.org in a python shelve.

Installation

install from https://pypi.org/project/pyUSDforex/

pip install pyUSDforex

Usage

import pyUSDforex

pyUSDforex.convert(100, 'EUR', 'Your APP_ID')

Get your app_id from https://openexchangerates.org/signup/free

Notes

We welcome your feedback and support, raise github ticket if you want to report a bug. Need new features? Contact us on github

Changelog

1.3

  • replace shelve with requests-cache

1.2

  • raise an exception when the currency code cannot be found

1.1

  • make threading safe with lock object

1.0

  • Init release

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

pyUSDforex-0.1.3.1.tar.gz (2.0 kB view hashes)

Uploaded Source

Built Distribution

pyUSDforex-0.1.3.1-py3-none-any.whl (3.1 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