Skip to main content

Python client for the Armenian electronic HDM API

Project description

e-hdm

e-hdm is an open source Python client for the Armenian electronic HDM API described in the April 2026 integration manual. https://src.am/storage/menu_contents_144/uc_hhpek_electronic_HDM_integration_manual_04_2026__69eef5319d758.pdf

It covers the full documented API surface:

  • checkConnection
  • activate
  • configureDepartments
  • getGoodList
  • print
  • printCopy
  • getReturnedReceiptInfo
  • printReturnReceipt

Features

  • Sync and async clients
  • Mutual TLS support
  • Decimal for money fields
  • Typed request/response models
  • Client-side validation for documented constraints
  • Domain-specific exceptions with original API payloads attached

Installation

pip install e-hdm

Quick start

from decimal import Decimal

from e_hdm import (
    DepartmentConfig,
    EHDMClient,
    Language,
    PrintMode,
    ProductReceiptItem,
    ProductReceiptRequest,
    TaxRegime,
)

client = EHDMClient(
    crn="52014201",
    base_url="https://ecrm.taxservice.am/taxsystem-rs-vcr",
    cert="/path/to/client.crt",
    key="/path/to/client.key",
    verify="/path/to/ca-root.crt",
    language=Language.HY,
)

client.check_connection()
client.activate()

client.configure_departments(
    [
        DepartmentConfig(dep=1, tax_regime=TaxRegime.VAT),
        DepartmentConfig(dep=2, tax_regime=TaxRegime.NO_VAT),
    ]
)

goods = client.get_good_list(tax_regime=TaxRegime.VAT, tin="00493113")

receipt = client.print_receipt(
    ProductReceiptRequest(
        card_amount=Decimal("40000.00"),
        cash_amount=Decimal("0.00"),
        partial_amount=Decimal("0.00"),
        pre_payment_amount=Decimal("4000.00"),
        cashier_id=3,
        partner_tin=None,
        items=[
            ProductReceiptItem(
                adg_code="9205",
                dep=1,
                good_code="9205-13",
                good_name="երգեհոն",
                quantity=Decimal("2.000"),
                unit="հատ",
                price=Decimal("25000.00"),
                additional_discount=Decimal("1000.00"),
            )
        ],
        emarks=[
            "04859996301235j8FdgGkUmp3Z2N2",
        ],
    )
)

copy = client.print_copy(receipt.receipt_id)

Notes

  • The API requires HTTPS with a registered certificate.
  • The crn in every request must match the certificate-bound CRN.
  • Returned timestamps are UTC-based epoch milliseconds.
  • Money uses Decimal throughout the library.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

e_hdm-1.0.0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

e_hdm-1.0.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file e_hdm-1.0.0.tar.gz.

File metadata

  • Download URL: e_hdm-1.0.0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for e_hdm-1.0.0.tar.gz
Algorithm Hash digest
SHA256 61b019ee912b691953c2cb2ff4f8a5db55d959904f8a6afe1743683e027b203a
MD5 6cd789ea3439170622b342bfaa15330d
BLAKE2b-256 c88666cd2754b22ca2d2561245c3b03ecaf3cef1e164bbcbf751731d5da0f7e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for e_hdm-1.0.0.tar.gz:

Publisher: publish.yml on Sevanbbx/e-hdm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file e_hdm-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: e_hdm-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for e_hdm-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0df06e8b1cd478fb8a9745de818e33f733981f4a7c266bb05ee334dff9348648
MD5 5593c7b3a89a4f62fbc8cbb750307a22
BLAKE2b-256 c0e35f47af7032a010a1e68088b7e151abadab24811678d45a23ffb7e44998ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for e_hdm-1.0.0-py3-none-any.whl:

Publisher: publish.yml on Sevanbbx/e-hdm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page