Django-based currency exchange app synced with XE datafeed API.
Project description
django-xe-currencies
django-xe-currencies allows you to create your own currency exchange API synced with XE datafeed service.
Quickstart:
Install django-xe-currencies:
$ pip install django-xe-currencies
Add tinymce and xe_currencies to INSTALLED_APPS in settings.py for your project:
INSTALLED_APPS = (
...
'xe_currencies',
)
Add xe_currencies.urls to urls.py for your project:
urlpatterns = patterns('',
...
url(r'^currencies/', include('xe_currencies.urls'))
)
Specify XE_DATAFEED_URL in your settings.py:
XE_DATAFEED_URL = 'http://www.xe.com/dfs/datafeed2.cgi?xeuser'
To make a synchronization with XE datafeed run:
python manage.py xe_sync
Access api at the next url:
http://yourdomain.com/currencies/api/v1/currencies/exchange/?from=EUR&to=USD&amount=100&format=json
This example will return exchange data in JSON format:
{"from": "EUR", "to": "USD", "result": "143.45 USD"}
To retrieve currencies list use:
http://example.com/currencies/api/v1/currencies/?format=json
Using exchange in your code:
from xe_currencies.api.resources import exchange
exchange('EUR', 'USD', 100)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-xe-currencies.tar.gz
(9.6 kB
view details)
File details
Details for the file django-xe-currencies.tar.gz.
File metadata
- Download URL: django-xe-currencies.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b24daa163317df0b59606e6d522f5c6d7d9adb3d1101fd9f43d6d43858944081
|
|
| MD5 |
41ce5d33020712cea29f52235a9623b3
|
|
| BLAKE2b-256 |
76f130978acf68e59a8839122505fa04ffedaaa426187ab16cb0b0e95b1f4174
|