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 added an opt-in natural reading (hardened in 1.2.1 for Unicode 18, ISO 15919, Gujarati Khoja, and round-trip parity); for historical or metrical verse (Awadhi, Braj Bhasha, Prakrit), pass BrahmicLanguage.SANSKRIT or BrahmicSchwaDeletionPolicy.NONE. 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.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 lipimala 1.2.1
File Size Uploaded Provenance Actions
lipimala-1.2.1.tar.gz 98.5 kB With provenance Details for lipimala-1.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 143.3 kB

Release files / lipimala-1.2.1.tar.gz

Download URL lipimala-1.2.1.tar.gz
Size 98.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9e74365b1567909571b868f5378295298f1cbcdd5f92ebebf3a9a696dd9d9eb1
BLAKE2b-256 checksum
How to use checksums
6f2652dad2e584c418ac99973af304b0a0d2f9433f43fc361009d67964965075
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 28, 2026.

Transparency log

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

Download URL lipimala-1.2.1-py3-none-any.whl
Size 44.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4f53d4f22e6805be844fc5537908946cebe87160f8a73972772bfde7faab2cd
BLAKE2b-256 checksum
How to use checksums
0b826f2f4f0ecbe2136aa817a906ff8b371371b56eb8721b91fe5406466e96aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 28, 2026.

Transparency log

Security for lipimala 1.2.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for lipimala-1.2.1.tar.gz

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 Nov 28, 2026.

Transparency log

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