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

Built distribution (wheel)

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

Total release size: 289.9 kB

Release files / entirius_django_accounts-6.0.1.tar.gz

Download URL entirius_django_accounts-6.0.1.tar.gz
Size 207.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6bd19d1e7aa992e934e340c9bda9af243462d871efacdfb7aff26d49dc34547d
BLAKE2b-256 checksum
How to use checksums
04226323479c553e2b4873be2efc8689ed169610cc963c0da369f6bda35b464c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","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.0.1-py3-none-any.whl

Download URL entirius_django_accounts-6.0.1-py3-none-any.whl
Size 82.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3269fd2ca13993ef893d317405e4367dfc097741cb50900dac8d4f5f7722da15
BLAKE2b-256 checksum
How to use checksums
20ab2c56b08fc1bd37aba6d5c529f00fcf26a9b26ccc054e3f557f71c369dd9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","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.0.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