Skip to main content

lipimala for Python

PyPI version License: MIT

IAST-style transliteration for Devanagari and Gujarati, with canonical reverse conversion, direct script conversion, and Plain-English or Hunterian output.

Install

pip install lipimala

Requires Python 3.12 or newer. The package has no runtime dependencies.

Use

from lipimala import (
    to_devanagari_from_iast,
    to_canonical_iast_from_gujarati,
    to_plain_english_from_devanagari,
    to_plain_english_from_gujarati,
    to_canonical_gujarati_from_devanagari,
)

print(to_devanagari_from_iast('Kṛṣṇa'))  # कृष्ण
print(to_canonical_iast_from_gujarati('કૃષ્ણ'))  # kṛṣṇa
print(to_plain_english_from_devanagari('कानपुर'))  # kaanpur
print(to_plain_english_from_gujarati('આજ મારે'))  # aaj maare
print(to_canonical_gujarati_from_devanagari('कृष्ण'))  # કૃષ્ણ

Use to_hunterian_from_devanagari() and to_hunterian_from_gujarati() for simplified ASCII Hunterian: one letter per long vowel and no consonant dots. That is the map and signboard spelling, not the 1954 macron form (jān). See the API reference. List helpers such as to_devanagari_from_iast_list() convert sequences of strings.

Profiles and options

Forward conversion accepts strictIast, iso15919Core, or extendedIndic profiles. The default is extendedIndic. Options control normalization, unknown input, digits, punctuation, Vedic accents, whitespace, and exact-source metadata.

Direct Devanagari and Gujarati reading accepts BrahmicPlainEnglishOptions. Defaults stay the 1.1 output. 1.2.0 adds an opt-in natural reading. Examples are in the API reference.

Preserve the original input

The rendered script may not encode the original Latin spelling, capitalization, or normalization. A result envelope keeps the source beside the rendered value:

from lipimala import to_devanagari

result = to_devanagari('Kṛṣṇa')
print(result.rendered)  # कृष्ण
print(result.restore_original())  # Kṛṣṇa

For a standalone string, set embed_exact_source_metadata=True in the conversion options and use an exact reverse function such as to_exact_iast_from_devanagari(). Unicode-tag metadata can be removed by systems that sanitize invisible characters.

License

MIT. See LICENSE.

Metadata

Release files for lipimala 1.2.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 lipimala 1.2.0
File Size Uploaded
lipimala-1.2.0.tar.gz 94.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lipimala 1.2.0
File Interpreter ABI Platform
lipimala-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 138.7 kB

Release files / lipimala-1.2.0.tar.gz

Download URL lipimala-1.2.0.tar.gz
Size 94.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7b968926af3298b94de2d6264c8d323502df3e78da11bad1a962a526e6c642f1
BLAKE2b-256 checksum
How to use checksums
f96669685436782765393a1ad1aebc3ef57ac17f5cda20046d9edb4e7525e7b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / lipimala-1.2.0-py3-none-any.whl

Download URL lipimala-1.2.0-py3-none-any.whl
Size 44.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a78825f12412b70c3dede8a03f01dd088cf65928bb61f69d7d80431edcd9afef
BLAKE2b-256 checksum
How to use checksums
5ed6a454be168bc3dc8236afe2b5d22e7e6d468baec57a2a578fba47efb53da1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.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