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

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.2
File Size Uploaded Provenance Actions
entirius_django_accounts-6.0.2.tar.gz 212.5 kB Without provenance Details for entirius_django_accounts-6.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 296.5 kB

Release files / entirius_django_accounts-6.0.2.tar.gz

Download URL entirius_django_accounts-6.0.2.tar.gz
Size 212.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4a8c389fb1973debbb8f4d13a8a460a632ebd38db2aaac903c0bbb5b12587604
BLAKE2b-256 checksum
How to use checksums
d510807bcaca3ce70b7825eeeee3b6079dae8e56f1776bacec03a54f04a6b0d3
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.2-py3-none-any.whl

Download URL entirius_django_accounts-6.0.2-py3-none-any.whl
Size 84.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
019b875960f8a2c2d5d20c43479c11569335c50247f90d2655a4c65ae508792e
BLAKE2b-256 checksum
How to use checksums
a2c47dcf67b119cb8c464fb63a847209b12c166391a314bcc0bef8bc03e4e02d
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.2

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