Skip to main content

BNR exchange rates for django apps.

Installation

To get the latest stable release from PyPi

pip install django-bnr

To get the latest commit from GitHub

pip install -e git+git://github.com/PressLabs/django-bnr.git#egg=django_bnr

Add django_bnr to your INSTALLED_APPS

INSTALLED_APPS = (
    ...,
    'django_bnr',
)

Don’t forget to migrate your database

./manage.py migrate django_bnr

Usage

The package provides a python function for getting BNR exchange rates.

from django_bnr.utils import get_bnr_rate
get_bnr_rate(date, currency)

It also provides a management command for getting the BNR rates. Running it daily in a cron ensures you have data cached since BNR offers rates for up to 15 days.

./manage.py get_bnr_rate -c CURRENCY -d DATE

Contribute

If you want to contribute to this project, please perform the following steps

# Fork this repository
# Clone your fork
mkvirtualenv -p python2.7 django-bnr

git co -b feature_branch master
# Implement your feature and tests
git add . && git commit
git push -u origin feature_branch
# Send us a pull request for your feature branch

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-0.4.2.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_bnr-0.4.2-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file django_bnr-0.4.2.tar.gz.

File metadata

  • Download URL: django_bnr-0.4.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.13

File hashes

Hashes for django_bnr-0.4.2.tar.gz
Algorithm Hash digest
SHA256 baf583a9da9b6b24e766e7d06bca55a47214bbfb079d7eb1da8e7648d2f0d8e4
MD5 2816b7b3eb4c78b9545bdfaec64acbf3
BLAKE2b-256 1ea500062a53a714dbee4840056619a00d2df28803084ffa37c455439ef1f1bd

See more details on using hashes here.

File details

Details for the file django_bnr-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: django_bnr-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.13

File hashes

Hashes for django_bnr-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0b83a3831a577358d4dda8e2c9fbef2e00716ae93deb2087d194b9337c6c76d9
MD5 57a3e160628ff82214cb690445710960
BLAKE2b-256 c1efbb76e3009d72d98546bc13759baeaa02e21258eea60db9fa8a4a95c5c343

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page