Metadata-Version: 2.4
Name: django-xchange
Version: 0.1.0
Summary: Django currency exchange library
Author-email: GigiusB <g.bronzini@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 3.2
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.2
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: requests
Provides-Extra: pyoxr
Requires-Dist: pyoxr; extra == 'pyoxr'
Description-Content-Type: text/markdown

Django XChange
==============

[![Pypi](https://badge.fury.io/py/django-xchange.svg)](https://badge.fury.io/py/django-xchange)
[![coverage](https://codecov.io/github/k-tech-italy/django-xchange/coverage.svg?branch=develop)](https://codecov.io/github/k-tech-italy/django-xchange?branch=develop)
[![Test](https://github.com/k-tech-italy/django-xchange/actions/workflows/tests.yaml/badge.svg)](https://github.com/k-tech-italy/django-xchange/actions/workflows/tests.yaml)
[![Docs](https://readthedocs.org/projects/django-xchange/badge/?version=stable)](http://django-xchange.readthedocs.io/en/stable/)
[![Django](https://img.shields.io/pypi/frameworkversions/django/django-xchange)](https://pypi.org/project/django-xchange/)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/django-xchange.svg)](https://pypi.org/project/django-xchange/)

Django XChange is a library providing a Rate model containing currency exchange rates for a day.

It relies on third-party libraries to fetch historical exchange rates.

How to use
----------

Default configuration is defined at src/django_xchange/config.py::DEFAULT_SETTINGS

A Django settings DJANGO_XCHANGE dictionary must be configured to override the default settings.

It is mandatory to configure the DJANGO_XCHANGE['BROKERS'] item with a list of brokers you intend to use.

For example:

```python
DJANGO_XCHANGE = {
    'BROKERS': ['django_xchange.brokers.pyoxr.PyoxrBroker']
}
```

See specific notes for the third-party exchange providers configuration

Third-party libraries
---------------------

### Open Exchange Rates

Requirements:

- extra: pyoxr (eg. `pip install django-xchange[pyoxr]`)
- settings: OPEN_EXCHANGE_RATES_APP_ID the app id provided by Open Exchange Rates
