Skip to main content

Free usd/{currency} utils by caching api from apilayer.com

Project description

Convert value from usd to currency

Simple and free usd2currency convert utils, by caching free-limited-api from apilayer.com

Quick start

  1. Install::
   pip install django-usd2currency
  1. Add "django_usd2currency" to your INSTALLED_APPS setting like this::
   INSTALLED_APPS = [
   ...
   'django_usd2currency',
   ]
   # Get free api from https://currencylayer.com/signup/free
   APILAYER_ACCESS_KEY = 'xxxxxxxxxxx'
  1. Start to use it in code
   from django_usd2currency.utils import usd2currency

   print(usd2currency(12, currency='CNY'))
  1. Use redis as cache backend to lock in the multiprocess env.

TODO:

  • write test

Release history Release notifications

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-usd2currency, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size django_usd2currency-0.1-py3-none-any.whl (2.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size django-usd2currency-0.1.tar.gz (2.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page