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.1.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.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_bnr-0.4.1.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.1.tar.gz
Algorithm Hash digest
SHA256 029e6cb46600d803f3d164a8e7580cf5df0eac4dfafe987ec4c550f7cc87ad0c
MD5 201770de98c141c2d4ed35a261821bc6
BLAKE2b-256 af71439f31c7b52fadb143eaa5e660e67358815ead033d1b49a097c397405cf9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_bnr-0.4.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 48e00ea7757b125345b1292609725cf45c7045f312acc9001d9af924f557ebfa
MD5 d660d1056ef6abf8961b981df1ec68b9
BLAKE2b-256 fbfb8cca484abe79c54d05482e6c1ac8216a8ec589e63d0cda9ced43096b90e4

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.2

2 files

This release

0.4.1 This release

2 files

0.4

1 file

0.3

1 file

0.2

1 file

0.1

1 file

Supported by

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