Skip to main content

entirius-django-checkout-export-to-magento-api

A Django module that exports orders, payments and shipments from Entirius, the open-source modular ecommerce platform, to an existing Magento 2 store over REST. Payments arrive in Magento as invoices, and every export is recorded so that a re-run sends only what is still missing.

PyPI Python License: MPL-2.0

What it does

  • Exports checkout orders to Magento 2, one order or every recent order of a channel.
  • Exports completed payments as Magento invoices and shipments as Magento shipments.
  • Cancels in Magento the orders that were canceled in the checkout.
  • Maps payment and shipping methods of the checkout to Magento codes through settings.
  • Maps each checkout channel to a Magento store, with a per-language store map.
  • Records every exported order, invoice and shipment, so re-runs skip what already succeeded.

Installation

uv add entirius-django-checkout-export-to-magento-api
pip install entirius-django-checkout-export-to-magento-api
INSTALLED_APPS = [
    ...
    "django_checkout",
    "django_checkout_export_to_magento_api",
]

django_checkout brings its own app requirements. Required settings: MAGENTO2_URL_FOR_CHECKOUT_EXPORT and MAGENTO2_TOKEN_FOR_CHECKOUT_EXPORT. The module also reads BI_ENVIRONMENT and BI_BUSINESS_UNIT (BI events) at import time, without a default.

Optional settings: MAPPING_PAYMENT_METHODS, MAPPING_SHIPPING_METHODS, SEND_FIELD_EXTENSION_ATTRIBUTES, MAGENTO2_EXPORT_GROUND_DATETIME; reference with defaults in https://github.com/entirius/entirius-django-checkout-export-to-magento-api/blob/develop/AGENTS.md (section Settings).

Quick start

# settings.py
MAGENTO2_URL_FOR_CHECKOUT_EXPORT = "https://magento.example.com/rest/"
MAGENTO2_TOKEN_FOR_CHECKOUT_EXPORT = "<api-token>"

# a shell or a scheduled job
from django.core.management import call_command

call_command("export-checkout-orders-to-magento", "default", days=7)

The positional argument is the idx of the checkout channel; days is how far back orders are looked up (default 1).

Requirements

  • Python 3.11 or newer, Django 5.0 or newer.
  • PostgreSQL.
  • A Magento 2 store with a REST API integration token.
  • Entirius packages pulled in: entirius-django-checkout (orders, payment and shipping intents), entirius-py-magento2-sdk (Magento 2 REST client), entirius-py-bievents (BI events), entirius-py-idx-normalizator (channel idx).

Documentation

Part of Entirius

This module runs inside the Entirius backend service (Volkanos) and sends its orders to an existing Magento 2 store.

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-checkout-export-to-magento-api/blob/develop/AGENTS.md

License

Mozilla Public License 2.0 (MPL-2.0) — see https://github.com/entirius/entirius-django-checkout-export-to-magento-api/blob/develop/LICENSE.

Metadata

Release files for entirius-django-checkout-export-to-magento-api 2.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-checkout-export-to-magento-api 2.0.1
File Size Uploaded Provenance Actions
entirius_django_checkout_export_to_magento_api-2.0.1.tar.gz 157.5 kB Without provenance Details for entirius_django_checkout_export_to_magento_api-2.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for entirius-django-checkout-export-to-magento-api 2.0.1
File Interpreter ABI Platform Actions
entirius_django_checkout_export_to_magento_api-2.0.1-py3-none-any.whl Python 3 none any Details for entirius_django_checkout_export_to_magento_api-2.0.1-py3-none-any.whl

Total release size: 193.3 kB

Release files / entirius_django_checkout_export_to_magento_api-2.0.1.tar.gz

Download URL entirius_django_checkout_export_to_magento_api-2.0.1.tar.gz
Size 157.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ec759db8b9ac492da9338b5a0f934074c18cc8d17cb9a5871ffd346b5f6071ea
BLAKE2b-256 checksum
How to use checksums
9e2ef1228e259fd296c562e7b97d33c8b7a127c395802de00c093a260d4a8dbc
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_checkout_export_to_magento_api-2.0.1-py3-none-any.whl

Download URL entirius_django_checkout_export_to_magento_api-2.0.1-py3-none-any.whl
Size 35.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8b95a4f659b66aef9f9ad06511bc1532f19b40d736b25b2828f340d3785dd70
BLAKE2b-256 checksum
How to use checksums
2a4ca7e42c2a179e22ca0299b826194946c73662939fb31241f86ac8b79678f0
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-checkout-export-to-magento-api 2.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