Skip to main content

entirius-django-utils

Shared Django building blocks for the modules of Entirius, the open-source modular ecommerce platform. Abstract base models, DRF API helpers, admin base classes, text tools and an AI toolbox client live here, so every module builds on the same foundations.

PyPI Python License: MPL-2.0

What it does

  • Abstract base models and manager helpers shared by every Entirius module.
  • DRF helpers: request parsing, filtering, pagination and the structured v2 error handling.
  • Admin base classes, text, slug and translation helpers.
  • A base for worker management commands with locking.
  • A typed client for the AI toolbox (completions, model catalogue, error mapping to DRF responses).

Installation

uv add entirius-django-utils
pip install entirius-django-utils

Optional extra: entirius-django-utils[unfold] (django-unfold admin theme).

INSTALLED_APPS = [
    ...
    "django_regional",
    "django_utils",
]

The toolbox client needs AI_TOOLBOX_BASE_URL, AI_TOOLBOX_API_KEY and AI_TOOLBOX_CHANNEL; the settings reference is https://github.com/entirius/entirius-django-utils/blob/develop/docs/toolbox-client.md.

Quick start

from django_utils.toolbox import CompletionRequest, Message, ToolboxClient

# settings: AI_TOOLBOX_BASE_URL = "https://toolbox.example.com"
with ToolboxClient() as client:
    response = client.complete(
        CompletionRequest(
            model="fake-chat",
            messages=[Message(role="user", content="Say hi as JSON")],
            json_schema={"type": "object"},
        )
    )

Requirements

  • Python 3.11 or newer, Django 4.2 or newer.
  • Entirius packages pulled in: entirius-django-regional, entirius-py-idx-normalizator, entirius-py-process-logger.

Documentation

Part of Entirius

Every module of the Entirius backend service (Volkanos) depends on this package.

Development

make install     # sync dependencies (uv)
make check       # lint + format check (ruff)
make test        # test suite (pytest + pytest-django)

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

License

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

Metadata

Release files for entirius-django-utils 2.3.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-utils 2.3.0
File Size Uploaded
entirius_django_utils-2.3.0.tar.gz 91.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for entirius-django-utils 2.3.0
File Interpreter ABI Platform
entirius_django_utils-2.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 133.3 kB

Release files / entirius_django_utils-2.3.0.tar.gz

Download URL entirius_django_utils-2.3.0.tar.gz
Size 91.2 kB
Tags Source
SHA-256 checksum
How to use checksums
26d9ca1ef953d79363cf1902096a73cfe40d1eb64c38a168e99c7f5f32d7347e
BLAKE2b-256 checksum
How to use checksums
b0253418958d318b6fa0a428c49a5832c4b21ae76ed2359953718e7f3fffb8d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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_utils-2.3.0-py3-none-any.whl

Download URL entirius_django_utils-2.3.0-py3-none-any.whl
Size 42.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75a00071b7aa04bab02e5cf225ce8d52b3ac61d614542f0b9873c3bfed36288e
BLAKE2b-256 checksum
How to use checksums
428ba24d6378e123100cded79a0334d0f8ea9c25d908e14e9274969575bd7c41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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 history Release notifications | RSS feed

This release

2.3.0 This release

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

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