Skip to main content

A django application to help with exchangerates from bnr.ro

Project description

# django-bnr-exchangerate
A django application that handles the updating and supplying of an exchange rate.
## Instalation
```
pip install django-bnr-exchangerate
```
Add to settings.py
```
'bnr_exchangerate',
```
## Example usage
Get an exchange rate for a value for a certain day.
If the day is on saturday or on sunday it will automatically get the friday exchange rate
```
from bnr_exchangerate.models import ExchangeRate
value = ExchangeRate.get_rate('EUR', '2015-10-10')
```
To import the history from 2005 to current year into the database execute the following command
```
./manage.py get_history
```
To update daily exchange rate run the following command
```
./manage.py get_daily
```

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

django-bnr-exchangerate-0.1.0.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

django_bnr_exchangerate-0.1.0-py3-none-any.whl (4.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