Skip to main content
.. image:: https://travis-ci.org/brightwrite/dj-currencies.svg?branch=master
:target: https://travis-ci.org/brightwrite/dj-currencies

Documentation
-------------

The full documentation is at https://dj-currencies.readthedocs.io.

Quickstart
----------

Install djcurrencies::

pip install dj-currencies

Add it to your `INSTALLED_APPS`:

.. code-block:: python

INSTALLED_APPS = (
...
'dj_currencies',
...
)

Settings
========


.. code-block:: python

DJANGO_CURRENCIES = {
'DEFAULT_BACKEND': 'djmoney_rates.backends.OpenExchangeBackend',
'OPENEXCHANGE_APP_ID': '',
'BASE_CURRENCIES': ['USD'],
'MAX_CACHE_DAYS': 7
}

**DEFAULT_BACKEND**: The selected backend to sync exchange rates

**OPENEXCHANGE_APP_ID**: Must be configured if you use **OpenExchangeBackend**

**BASE_CURRENCIES**: A list of base currencies to use. At the time of this version, you will only be able to convert currency from any one of the base currency to target currency.

**MAX_CACHE_DAYS**: Only use the cache within this time limit. If exchange rates was not synced within the time frame, an exception will thrown

.. NOTE::
You will need to have at least "OPENEXCHANGE_APP_ID" configured if you use **OpenExchangeBackend**



Features
--------

* [open exchange rates](openexchangerates.org) integration
* Extensible backend design, hook your own exchange rate sources
* Multi base currencies support, no double conversion to lose precision
* Store historical exchange rates
* offline currency conversion

Running Tests
-------------

Does the code actually work?

::

source <YOURVIRTUALENV>/bin/activate
(myenv) $ python runtests.py




History
-------

0.0.1 (2018-04-23)
++++++++++++++++++

* First release on PyPI.

Metadata

Release files for dj-currencies 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dj-currencies 0.1.1
File Size Uploaded
dj-currencies-0.1.1.tar.gz 9.8 kB Details

Release files / dj-currencies-0.1.1.tar.gz

Download URL dj-currencies-0.1.1.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2e55b43cbbf639dd13c2d1ea5b0a0c276e7e0f17672c21981a071a061e8106a5
BLAKE2b-256 checksum
How to use checksums
d3f3b054134c502a4441ab58e7057782e395fe91de9515b86a3d675fd7aef06c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

Release history Release notifications | RSS feed

1.8.0

2 release files

1.1.0

2 release files

1.0.1

1 release file

0.1.2

1 release file

This release

0.1.1 This release

1 release file

0.1.0

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page