Skip to main content

entirius-django-accounts

A Django module for customer accounts in Entirius, the open-source modular ecommerce platform: registration, JWT login, address book and wishlist. It serves a channel-scoped public API for the storefront and a read-only admin API for the CMS.

PyPI Python License: MPL-2.0

What it does

  • Registers customers with double opt-in email confirmation and a configurable password policy.
  • Logs customers in with JWT access and refresh tokens, including logout and password reset.
  • Keeps an address book with billing and shipping defaults and file attachments in private storage.
  • Stores one wishlist per customer and sales channel, and merges a guest wishlist on login.
  • Supports social login with Google and Facebook.
  • Imports accounts and addresses from CSV, and deletes a customer on request through an admin endpoint.

Installation

uv add entirius-django-accounts
pip install entirius-django-accounts

Extras: entirius-django-accounts[pim] adds the product-representation sync from entirius-django-pim.

INSTALLED_APPS = [
    ...
    "allauth",
    "allauth.account",
    "allauth.socialaccount",
    "django_regional",
    "django_utils",
    "django_email",
    "django_accounts",
]

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

JWT_SECRET = "<random secret>"
PRIVATE_DIR = "/private"            # root of private file storage
MIGRATION_0023_MECHANISM = 1        # wishlist restructuring mode; 1 on a fresh installation

JWT_SECRET, PRIVATE_DIR and MIGRATION_0023_MECHANISM are read at import time and the module refuses to start without them. Settings reference: https://github.com/entirius/entirius-django-accounts/blob/develop/docs/configuration.md

Register the JWT backend, or every customer endpoint behind @authenticate (customer/me/, profile, addresses, wishlist, password change, logout) answers 401 even with a valid token:

AUTHENTICATION_BACKENDS = [
    "django_accounts.backends.JWTAccessBackend",
    "django.contrib.auth.backends.ModelBackend",  # Django admin login
]

The customer-delete admin endpoint takes a key. Where entirius-django-access is installed (the backend service installs it when available) the key is an access token:

python manage.py access_token create --application <name> --create-application --scope accounts.erase --channel <idx>

Only without django_access the key comes from the module's own command:

python manage.py generate-api-admin-key <channel_idx>

Quick start

from django_accounts.services.admin_service import list_customers

verified = list_customers(search="example.com", is_verified=True, ordering="-created_at")

Requirements

  • Python 3.11 or newer, Django 4.0 or newer.
  • PostgreSQL (the test suite runs on it through DATABASE_URL).
  • django-allauth, Django REST Framework, djangorestframework-simplejwt, marshmallow, pydantic, drf-spectacular.
  • Entirius packages pulled in: entirius-django-email, entirius-django-regional, entirius-django-utils, entirius-py-process-logger, entirius-py-idx-normalizator, entirius-py-int-enum-choices.
  • Optional: entirius-django-pim (the pim extra), entirius-django-access (keys as access tokens).

Documentation

Part of Entirius

This module runs inside the Entirius backend service (Volkanos) and owns customer identity for the storefront.

Development

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-accounts/blob/develop/AGENTS.md

License

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

Metadata

Release files for entirius-django-accounts 6.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for entirius-django-accounts 6.1.1
File Size Uploaded Provenance Actions
entirius_django_accounts-6.1.1.tar.gz 222.1 kB Without provenance Details for entirius_django_accounts-6.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for entirius-django-accounts 6.1.1
File Interpreter ABI Platform Actions
entirius_django_accounts-6.1.1-py3-none-any.whl Python 3 none any Details for entirius_django_accounts-6.1.1-py3-none-any.whl

Total release size: 308.2 kB

Release files / entirius_django_accounts-6.1.1.tar.gz

Download URL entirius_django_accounts-6.1.1.tar.gz
Size 222.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cd9cdead635d7866ddda25e09dcefbaf2d180015e330bdeb68d8f4175a1e6681
BLAKE2b-256 checksum
How to use checksums
2db2631611eaefc5ee9f3ff8b9898c78b5034acbc309f97efdd2150afeb919b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / entirius_django_accounts-6.1.1-py3-none-any.whl

Download URL entirius_django_accounts-6.1.1-py3-none-any.whl
Size 86.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83904bb5691fc916e22c59c6f23792fce748f6780e9f23a1b37f957b7afe0320
BLAKE2b-256 checksum
How to use checksums
0735f1f636a93b2e70d74c43489c51b159ace010229d7a8f61d45a7eb3d53b72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for entirius-django-accounts 6.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page