Skip to main content

currency, exchange rates and conversions support for django

Project description

Currency, exchange rate and conversions support for django projects.


django-exchange is available on pypi repositories so youre free to use pip or easy_install:

$ pip install django-exchange

Or you might want to install from source:

$ wget
$ unzip
$ cd django-exchange-xxx
$ python install

Add exchange into your INSTALLED_APPS settings of your django project:


Don’t forget to sync your db to create corresponding database tables:

$ python syncdb

Populating Data

django-exchange supports populating currency and exchange rates using a service provider automatically. Currently it has built in support for service. It is only a matter of supplying an api key obtained from as django settings using the key OPENEXCHANGERATES_API_KEY:


Now you can populate you currency and exchange rates magically by typing:

$ python update_exchange_rates

If you want to use you own service provider, you should consider implementing exchange.adapters.BaseAdapter class and pass you implementation class path as an argument to update_exchange_rates command:

$ python update_exchange_rates -c myproj.providers.MyProvider


Currency conversions is dead easy. There are auxilaray methods helps you calculate conversions using populated exchange rates under exchange.conversions module.

Take a look at the example below:

>>> from exchange.conversion import Price, convert
>>> my_price = Price(50, 'USD')
>>> my_price.convert('YEN')
<Price (4678.50 YEN)>


Coming soon…


  • Convenient template tags
  • Django price field implementation supporting currency conversions
  • Easier api with convenient refaactorings
  • A few more builtin exchange rate provider

Project details

Download files

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

Files for django-exchange, version 0.7.0
Filename, size File type Python version Upload date Hashes
Filename, size django_exchange-0.7.0-py2.py3-none-any.whl (15.2 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size django-exchange-0.7.0.tar.gz (12.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page