Metadata-Version: 2.5
Name: entirius-django-leads
Version: 0.4.0
Summary: Leads and B2B pipeline module for Entirius: companies, contacts, stages, rules and recipient selection
Project-URL: Homepage, https://docs.entirius.com/
Project-URL: Documentation, https://github.com/entirius/entirius-django-leads/tree/develop/docs
Project-URL: Repository, https://github.com/entirius/entirius-django-leads
Project-URL: Changelog, https://github.com/entirius/entirius-django-leads/blob/develop/CHANGELOG.md
Project-URL: Issues, https://github.com/entirius/entirius-django-leads/issues
Author: Entirius
Maintainer-email: Piotr Brzozowski <piotrb@entirius.com>, Paweł Kiełt <cptshooter12@gmail.com>, Mateusz Baran <mateuszbaranpv@gmail.com>, Michał Kloczkowski <michal@kloczkowski.pl>
License-Expression: MPL-2.0
License-File: LICENSE
Keywords: b2b,crm,django,ecommerce,entirius,gdpr,leads,sales-pipeline
Classifier: Development Status :: 4 - Beta
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 :: Office/Business
Requires-Python: >=3.11
Requires-Dist: celery-once>=3.0.1
Requires-Dist: celery>=5.3
Requires-Dist: django>=4.2
Requires-Dist: djangorestframework-simplejwt>=5.3
Requires-Dist: djangorestframework>=3.14
Requires-Dist: drf-spectacular>=0.27
Requires-Dist: entirius-django-agreements>=2.1.0
Requires-Dist: entirius-django-communicator>=0.4.0
Requires-Dist: entirius-django-regional>=2.0.1
Requires-Dist: entirius-django-siteintel>=0.1.0
Requires-Dist: entirius-django-utils>=2.3.0
Requires-Dist: pydantic[email]>=2.0
Requires-Dist: tldextract>=5.3
Provides-Extra: contact-forms
Requires-Dist: entirius-django-contact-forms; extra == 'contact-forms'
Provides-Extra: dev
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: notifications
Requires-Dist: entirius-django-notifications>=0.1.0; extra == 'notifications'
Provides-Extra: test
Requires-Dist: dj-database-url>=2.0; extra == 'test'
Requires-Dist: entirius-django-contact-forms; extra == 'test'
Requires-Dist: entirius-django-notifications>=0.1.0; extra == 'test'
Requires-Dist: factory-boy; extra == 'test'
Requires-Dist: psycopg[binary]>=3.1; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-django; extra == 'test'
Description-Content-Type: text/markdown

# entirius-django-leads

A Django module for leads and the B2B sales pipeline of Entirius, the open-source modular ecommerce platform.
It keeps companies and contacts, moves them through stages, runs outreach rules and handles retention and GDPR.

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

## What it does

- Imports companies and contacts from CSV and contact forms, with deduplication by domain and email.
- Moves companies through configurable pipeline stages with a full activity timeline.
- Runs stage rules: AI-assisted site analysis, recipient selection and outreach drafts behind a consent gate.
- Anonymises idle contacts on a retention schedule and serves GDPR export and erase requests.
- Exposes an admin API (JWT, Pydantic schemas, OpenAPI) for the CMS.

## Installation

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

Optional extras: `entirius-django-leads[contact-forms]` (form submissions become contacts),
`entirius-django-leads[notifications]` (failure notifications to sales admins).

```python
INSTALLED_APPS = [
    # ...
    "django_utils",
    "django_regional",
    "django_agreements",
    "django_siteintel",
    "django_communicator",
    "django_leads",
]
```

Settings, queue and bootstrap order: `docs/install.md` —
https://github.com/entirius/entirius-django-leads/blob/develop/docs/install.md

## Quick start

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

urlpatterns.append(path("", include("django_leads.urls")))
```

The admin API is then mounted under `api/leads/v2/admin/`; the endpoints are described in
https://github.com/entirius/entirius-django-leads/blob/develop/docs/api.md

## Requirements

- Python 3.11 or newer, Django 4.2 or newer.
- PostgreSQL in production (tests fall back to sqlite).
- A Celery worker consuming the `leads_default` queue.
- Entirius packages pulled in: `entirius-django-utils`, `entirius-django-regional`, `entirius-django-agreements`,
  `entirius-django-communicator`, `entirius-django-siteintel`.

## Documentation

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

## Part of Entirius

This module runs inside the Entirius backend service (Volkanos) and drafts its outreach through the communicator.

- 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-communicator, https://github.com/entirius/entirius-django-siteintel,
  https://github.com/entirius/entirius-django-agreements

## Development

```shell
make install     # sync dependencies (uv, incl. extras)
make check       # lint + format check (ruff)
make test        # test suite (pytest; PostgreSQL with DATABASE_URL, else sqlite)
```

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

## License

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