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.0

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.0
File Size Uploaded Provenance Actions
entirius_django_accounts-6.1.0.tar.gz 214.8 kB Without provenance Details for entirius_django_accounts-6.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 299.1 kB

Release files / entirius_django_accounts-6.1.0.tar.gz

Download URL entirius_django_accounts-6.1.0.tar.gz
Size 214.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c760197c1617f69f94447b9999fcc32d5bacd652eb0bf0f52e62fa1d0dbd281a
BLAKE2b-256 checksum
How to use checksums
f9f7fa35e0bc910a533e3e6d9ec56ae812f02fa666eac96a698d7680a3d14c3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","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.0-py3-none-any.whl

Download URL entirius_django_accounts-6.1.0-py3-none-any.whl
Size 84.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89888b6f93563ffd532551a637428a2c844a2da27849e04bd19f344f5a35720f
BLAKE2b-256 checksum
How to use checksums
92dc8220404492baeb31d0a045ab37ebb833540579416e4740f573c5a485fb8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","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.0

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