Metadata-Version: 2.5
Name: entirius-django-matrix
Version: 4.4.1
Summary: Storefront read model for Entirius: a denormalized catalog projection with faceted search, prices and stock
Project-URL: Homepage, https://docs.entirius.com/
Project-URL: Documentation, https://github.com/entirius/entirius-django-matrix/tree/develop/docs
Project-URL: Repository, https://github.com/entirius/entirius-django-matrix
Project-URL: Changelog, https://github.com/entirius/entirius-django-matrix/blob/develop/CHANGELOG.md
Project-URL: Issues, https://github.com/entirius/entirius-django-matrix/issues
Author: Entirius
Maintainer: Piotr Brzozowski, Paweł Kiełt, Mateusz Baran, Michał Kloczkowski
License-Expression: MPL-2.0
License-File: LICENSE
Keywords: catalog,django,ecommerce,entirius,read-model,search,storefront
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
Requires-Python: >=3.11
Requires-Dist: celery
Requires-Dist: django>=5.0
Requires-Dist: djangorestframework-simplejwt>=5.3
Requires-Dist: djangorestframework>=3.14
Requires-Dist: drf-spectacular>=0.27
Requires-Dist: entirius-django-pim>=3.1.0
Requires-Dist: entirius-django-regional>=2.0.0
Requires-Dist: entirius-django-utils>=2.0.0
Requires-Dist: entirius-py-bievents>=2.0.0
Requires-Dist: entirius-py-idx-normalizator>=2.0.0
Requires-Dist: entirius-py-magento2-sdk2>=2.0.0
Requires-Dist: entirius-py-process-logger>=2.0.0
Requires-Dist: marshmallow
Requires-Dist: marshmallow-dataclass
Requires-Dist: pydantic>=2.0
Provides-Extra: checkout
Requires-Dist: entirius-django-checkout>=9.0.0; extra == 'checkout'
Provides-Extra: dev
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: omnibus
Requires-Dist: entirius-django-omnibus>=3.0.0; extra == 'omnibus'
Provides-Extra: pricemanager
Requires-Dist: entirius-django-pricemanager>=4.1.0; extra == 'pricemanager'
Provides-Extra: qms
Requires-Dist: entirius-django-qms>=4.0.0; extra == 'qms'
Provides-Extra: reviews
Requires-Dist: entirius-django-reviews>=2.0.0; extra == 'reviews'
Provides-Extra: test
Requires-Dist: dj-database-url; extra == 'test'
Requires-Dist: psycopg[binary]; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-django; extra == 'test'
Description-Content-Type: text/markdown

# entirius-django-matrix

A Django module that keeps the storefront read model of Entirius, the open-source modular ecommerce platform. It
holds a denormalized, per-channel projection of the product catalog — translations, prices and stock — and serves
it to the storefront over a versioned REST API with faceted, full-text and trigram search.

[![PyPI](https://img.shields.io/pypi/v/entirius-django-matrix.svg)](https://pypi.org/project/entirius-django-matrix/)
[![Python](https://img.shields.io/pypi/pyversions/entirius-django-matrix.svg)](https://pypi.org/project/entirius-django-matrix/)
[![License: MPL-2.0](https://img.shields.io/badge/license-MPL--2.0-blue.svg)](https://github.com/entirius/entirius-django-matrix/blob/develop/LICENSE)

## What it does

- Keeps one product representation per sales channel, with translations, prices and stock.
- Serves product listings, product details, categories, options, prices and stock to the storefront.
- Searches the catalog with facets, PostgreSQL full-text search and optional trigram (fuzzy) matching.
- Fills the read model from the product, pricing and stock modules with worker jobs and management commands.
- Degrades gracefully when an optional source module (stock, prices, omnibus prices, reviews) is not installed;
  stock, prices and reviews also when the module is installed but not enabled.

## Installation

```shell
uv add entirius-django-matrix
pip install entirius-django-matrix
```

```python
INSTALLED_APPS = [
    ...
    "django.contrib.postgres",
    "django_utils",
    "django_regional",
    "django_pim",
    "django_matrix",
]

# urls.py
urlpatterns = [
    path("", include("django_matrix.urls")),
]
```

No setting is required: every setting has a default. Reference with defaults:
https://github.com/entirius/entirius-django-matrix/blob/develop/docs/configuration.md

Optional integrations are extras: `qms` (stock), `pricemanager` (prices), `checkout` (real-time stock updates),
`omnibus` (lowest recent price), `reviews` (average rating).

```shell
uv add "entirius-django-matrix[qms,pricemanager]"
```

## Quick start

```python
# urls.py
from django.urls import include, path

urlpatterns = [
    path("", include("django_matrix.urls")),
]
```

```shell
python manage.py migrate
python manage.py fill-read-model
```

## Requirements

- Python 3.11 or newer, Django 5.0 or newer.
- PostgreSQL (GIN indexes, full-text search; `pg_trgm` for fuzzy search).
- Entirius packages pulled in: `entirius-django-utils`, `entirius-django-pim`, `entirius-django-regional`,
  `entirius-py-magento2-sdk2`, `entirius-py-idx-normalizator`, `entirius-py-bievents`, `entirius-py-process-logger`.

## Documentation

- Module docs: https://github.com/entirius/entirius-django-matrix/tree/develop/docs
- Entirius documentation: https://docs.entirius.com/
- Changelog: https://github.com/entirius/entirius-django-matrix/blob/develop/CHANGELOG.md

## Part of Entirius

This module runs inside the Entirius backend service (Volkanos), next to the product, pricing and stock modules.

- Backend service: https://github.com/entirius/entirius-service-volkanos
- Docker harness: https://github.com/entirius/entirius-zeno
- Sibling modules: https://github.com/entirius/entirius-django-pim, https://github.com/entirius/entirius-django-pricemanager,
  https://github.com/entirius/entirius-django-qms

## Development

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

Development and agent instructions: https://github.com/entirius/entirius-django-matrix/blob/develop/AGENTS.md

## License

Mozilla Public License 2.0 (MPL-2.0) — see https://github.com/entirius/entirius-django-matrix/blob/develop/LICENSE.
