Metadata-Version: 2.4
Name: entirius-django-pricetuner
Version: 2.0.0
Summary: Rule-based price adjustments per channel, customer group, country, and currency
Project-URL: Repository, https://github.com/entirius/entirius-django-pricetuner
Author: Entirius
License-Expression: MPL-2.0
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: django-admin-inline-paginator>=0.3.0
Requires-Dist: django>=5.0
Requires-Dist: entirius-django-accounts>=5.0.0
Requires-Dist: entirius-django-pim>=3.0.0
Requires-Dist: entirius-django-regional>=2.0.1
Requires-Dist: entirius-py-bievents>=2.0.0
Requires-Dist: entirius-py-idx-normalizator>=2.0.0
Provides-Extra: dev
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: test
Requires-Dist: dj-database-url; extra == 'test'
Requires-Dist: entirius-django-captcha>=2.0.0; extra == 'test'
Requires-Dist: psycopg[binary]; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-django; extra == 'test'
Description-Content-Type: text/markdown

# Django PriceTuner

Rule-based price adjustments for the Volkanos ecommerce platform. Rules scoped to channels,
product categories, and products modify prices per customer group, country, and currency —
companion module to [entirius-django-pim](https://github.com/entirius/entirius-django-pim) and
[entirius-django-accounts](https://github.com/entirius/entirius-django-accounts).

## Installation

```shell
pip install entirius-django-pricetuner
```

Add the app to your project:

```python
INSTALLED_APPS = [
    ...
    "django_pricetuner",
]
```

Requires `django_accounts`, `django_pim`, and `django_regional` in `INSTALLED_APPS`
(all installed automatically as dependencies).

## Usage

Configure channels, rules, conditions, and scopes in the Django admin. Query adjusted prices via
`django_pricetuner.output.PriceTuner`. Test rules from the CLI:

```bash
python manage.py test-rule --channel_idx <idx> --sku <sku> [--currency PLN] [--country PL]
```

## Development

```shell
make install     # sync dependencies (uv)
make check       # lint + format check (ruff)
make test        # test suite (pytest + pytest-django)
```

Architecture and settings reference: [AGENTS.md](AGENTS.md).

## License

Mozilla Public License 2.0 — see [LICENSE](LICENSE).
