Skip to main content

Identifier (idx/SKU/EAN) normalizer and validator

Project description

idx-normalizator

Normalizers and validators for product identifiers — index/idx (slugified, length-capped with an md5 suffix), SKU, and EAN.

Installation

pip install entirius-py-idx-normalizator

Usage

from idx_normalizator import normalize_idx, validate_idx, validate_sku, normalize_ean

normalize_idx("Example Cammel Name")   # "example-cammel-name"
validate_idx("example-cammel-name")    # raises ValueError if not a valid idx
validate_sku("ABC-123")                # raises ValueError on forbidden chars / length
normalize_ean(" 5901234 ")             # "5901234"

Development

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

Development and agent instructions: AGENTS.md.

License

Mozilla Public License 2.0 — see LICENSE.

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

entirius_py_idx_normalizator-2.0.0.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

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

entirius_py_idx_normalizator-2.0.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file entirius_py_idx_normalizator-2.0.0.tar.gz.

File metadata

  • Download URL: entirius_py_idx_normalizator-2.0.0.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}

File hashes

Hashes for entirius_py_idx_normalizator-2.0.0.tar.gz
Algorithm Hash digest
SHA256 2b59beefbb9dfa8fd0e93a6815f232e71520b72b075b5bbd340164f11bbf9c17
MD5 03a898544cdc36ab19d14ce210be761a
BLAKE2b-256 e3602e8ea011c1af165e37664c1d69e2548ee16598390ec839c7dbce6c4c22a1

See more details on using hashes here.

File details

Details for the file entirius_py_idx_normalizator-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: entirius_py_idx_normalizator-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}

File hashes

Hashes for entirius_py_idx_normalizator-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de10759515cec43dd78b27446ecc81d401e3eb00430b4a21a5ae8d62302021f0
MD5 3ceff2a488faf924f7d1b440bb4d1235
BLAKE2b-256 561717e62a4f519b1853e9c539526b416063d72447c9890882983fa6616eb4ef

See more details on using hashes here.

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