Skip to main content

entirius-django-pim-translator

A Django module that translates the product catalogue of Entirius, the open-source modular ecommerce platform. It extracts translatable fields from PIM entities, sends them to an AI toolbox service over HTTP and writes the translated text back.

PyPI Python License: MPL-2.0

What it does

  • Translates products, categories, features, attributes and other PIM entities into the requested target languages.
  • Estimates the cost first: every translate call accepts dry_run and returns an estimate without translating.
  • Runs bulk translation as toolbox jobs that a Celery task polls and applies when they finish.
  • Sanitises translated HTML and marks the target language as overridden, so inheritance does not undo it.
  • Imports existing official translations from a JSONL file without calling the AI toolbox.
  • Exposes an admin API (JWT, Pydantic schemas, OpenAPI) and the commands translate_pim and import_translations.

Installation

uv add entirius-django-pim-translator
pip install entirius-django-pim-translator
INSTALLED_APPS = [
    # ...
    "django_pim",
    "django_utils",
    "django_utils_translator",
    "django_pim_translator",
]

# main/urls.py
urlpatterns.append(path("", include("django_pim_translator.urls")))

The module needs a reachable AI toolbox service, configured through AI_TOOLBOX_BASE_URL and AI_TOOLBOX_API_KEY of entirius-django-utils; the channel idx of a call is sent as the toolbox channel. The toolbox itself is not part of this package. Settings reference: https://github.com/entirius/entirius-django-utils/blob/develop/docs/toolbox-client.md

Quick start

from django_pim_translator.services.translator import translate_entity

estimate = translate_entity(
    channel_idx="my-channel",
    entity_type="product",
    entity_id="SKU-1",
    target_languages=["pl"],
    dry_run=True,
)

With dry_run=True the call returns a cost estimate; without it a toolbox job is created and applied by the Celery task. The admin API is mounted under api/pim-translator/v2/admin/<shop_idx>/. The same orchestrator backs manage.py translate_pim.

Requirements

  • Python 3.11 or newer, Django 5.0 or newer.
  • PostgreSQL (through entirius-django-pim) and a Celery worker.
  • A reachable AI toolbox service (AI_TOOLBOX_* settings).
  • Entirius packages pulled in: entirius-django-pim, entirius-django-utils, entirius-django-utils-translator.

Documentation

Part of Entirius

This module runs inside the Entirius backend service (Volkanos) next to the PIM module it translates.

Development

make install     # sync dependencies (uv, incl. extras)
make check       # lint + format check (ruff)
make test        # test suite (pytest; PostgreSQL through DATABASE_URL)

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

License

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

Metadata

Release files for entirius-django-pim-translator 2.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-pim-translator 2.1.1
File Size Uploaded Provenance Actions
entirius_django_pim_translator-2.1.1.tar.gz 151.8 kB Without provenance Details for entirius_django_pim_translator-2.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for entirius-django-pim-translator 2.1.1
File Interpreter ABI Platform Actions
entirius_django_pim_translator-2.1.1-py3-none-any.whl Python 3 none any Details for entirius_django_pim_translator-2.1.1-py3-none-any.whl

Total release size: 186.3 kB

Release files / entirius_django_pim_translator-2.1.1.tar.gz

Download URL entirius_django_pim_translator-2.1.1.tar.gz
Size 151.8 kB
Tags Source
SHA-256 checksum
How to use checksums
62e9acf1550c531e5d6cc4589add1e1cdeaed1c4d31927f73c247cb83069fef1
BLAKE2b-256 checksum
How to use checksums
902de014e1b84b1d3e49861e764bdd4e987653804c9a13f63a1a8b6d7564b1e0
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_pim_translator-2.1.1-py3-none-any.whl

Download URL entirius_django_pim_translator-2.1.1-py3-none-any.whl
Size 34.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42b6ce07db1841f194014d1e6c1c88df5a3ee6399d0239ae7bcacd67daf382a9
BLAKE2b-256 checksum
How to use checksums
e53c8a8dd0935e2226f5c59784605e6519ec53edb0e4cffd91687ba25300cba1
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-pim-translator 2.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