Kannada ASCII ↔ Unicode converter (basic mapping-based)
Project description
Kannada ASCII ↔ Unicode Converter
A lightweight Python library for converting Kannada text between legacy ASCII-based encodings and modern Unicode.
This package is useful for:
- legacy Kannada ASCII data and fonts
- Unicode migration work
- text processing and validation
Installation
pip install kannada-ascii-unicode
Quick Start
from kannada_converter import KannadaConverter
converter = KannadaConverter()
ascii_text = "¥ÀAiÀiÁðAiÀĪÁV"
unicode_text = converter.convert_ascii_to_unicode(ascii_text)
print(unicode_text) # ಪರ್ಯಾಯವಾಗಿ
from kannada_converter import unicode_to_ascii
print(unicode_to_ascii("ಪರ್ಯಾಯವಾಗಿ"))
API Overview
from kannada_converter import KannadaConverter, ascii_to_unicode, unicode_to_ascii
converter = KannadaConverter()
converter.convert_ascii_to_unicode("PÀ")
converter.convert_unicode_to_ascii("ಕ")
Project Status
This project is currently in an early but usable state.
- basic ASCII ↔ Unicode conversion works
- complex conjuncts and full round-trip accuracy are still being improved
- the package layout and public API are now organized for publication and maintenance
How It Works
- uses JSON-backed Kannada mapping data from the bundled resource file
- applies mapping-based conversion rules for ASCII and Unicode text
- supports a simple sample app and test suite for validation
Development and Testing
1. Create and activate a virtual environment
python -m venv .venv
.venv\Scripts\Activate.ps1
2. Install development dependencies
python -m pip install --upgrade pip
pip install build pytest twine
3. Run the test suite
pytest -q
4. Run the sample app
python testapp/app.py
5. Build the package locally
python -m build
6. Validate the distribution files
twine check dist/*
Recommended development workflow
- make changes in a dedicated feature branch
- add or update tests for any new behavior
- run the full test suite before opening a PR
- keep public API changes intentional and documented
- prefer small, focused pull requests
Build and Publish
Build locally
python -m build
This creates the distribution files in the dist folder.
Validate the package
twine check dist/*
Publish with PowerShell
A helper script is included at publish.ps1.
./publish.ps1
The script will:
- clean old build artifacts
- build the package
- validate it with twine
- prompt for your PyPI API token
- upload the package to PyPI
Publish through GitHub Actions
A GitHub Actions workflow is already present in .github/workflows/python-publish.yml.
It will build the package on push and publish to PyPI when a GitHub Release is published.
For PyPI publishing through GitHub Actions, make sure the repository is configured with the required PyPI trusted publisher settings.
Contributing
Contributions are welcome.
- Fork the repository.
- Create a feature branch with a clear name such as
feature/your-changeorfix/issue-name. - Make your changes and add or update tests where relevant.
- Run the test suite and verify the package still builds.
- Open a pull request with a short summary, the motivation for the change, and any testing notes.
Contribution guidelines
- keep changes focused and easy to review
- avoid breaking the public API unless the change is intentional
- update documentation when behavior or usage changes
- include regression tests for bug fixes and new conversions
- follow the existing package layout and naming patterns
For maintainers
When preparing a release:
- update the package version in pyproject.toml
- ensure tests are passing
- build and validate the distribution files
- publish the release with a clear changelog summary
Project Structure
- kannada_converter/ - package source
- kannada_converter/mappings/ - bundled conversion mappings
- tests/ - automated tests
- testapp/ - runnable example app
- publish.ps1 - local publish helper
- .github/workflows/python-publish.yml - CI/CD publish workflow
License
MIT License
Author
Ravikumar Pawar
GitHub: https://github.com/kagapa-blr
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kannada_ascii_unicode-0.1.2.tar.gz.
File metadata
- Download URL: kannada_ascii_unicode-0.1.2.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d78383fb8ca707a447d93846d59d2dcff6d93a9c98f90697708db514ecbf4731
|
|
| MD5 |
65958494fc547238ec6254d8d62fae6f
|
|
| BLAKE2b-256 |
1c88b867f71487795d80e5e0741334bccdc1313bff57e2ea087fd4b83c81c187
|
Provenance
The following attestation bundles were made for kannada_ascii_unicode-0.1.2.tar.gz:
Publisher:
python-publish.yml on kagapa-blr/py-kannada-ascii-unicode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kannada_ascii_unicode-0.1.2.tar.gz -
Subject digest:
d78383fb8ca707a447d93846d59d2dcff6d93a9c98f90697708db514ecbf4731 - Sigstore transparency entry: 2070880856
- Sigstore integration time:
-
Permalink:
kagapa-blr/py-kannada-ascii-unicode@abbbeeb4b5552c26683b3d9b281893e37f34cfa7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kagapa-blr
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@abbbeeb4b5552c26683b3d9b281893e37f34cfa7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file kannada_ascii_unicode-0.1.2-py3-none-any.whl.
File metadata
- Download URL: kannada_ascii_unicode-0.1.2-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18f96d281fbbe896e2c9826b49c090bea5f70d0aadf7f6c77bd3ac88361c5178
|
|
| MD5 |
fd86c905fbc2ea990d761b968643edcd
|
|
| BLAKE2b-256 |
123e010880c8abbaf0936f60b257952f5d1a8a122879872c0ef7d18f355e5713
|
Provenance
The following attestation bundles were made for kannada_ascii_unicode-0.1.2-py3-none-any.whl:
Publisher:
python-publish.yml on kagapa-blr/py-kannada-ascii-unicode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kannada_ascii_unicode-0.1.2-py3-none-any.whl -
Subject digest:
18f96d281fbbe896e2c9826b49c090bea5f70d0aadf7f6c77bd3ac88361c5178 - Sigstore transparency entry: 2070880880
- Sigstore integration time:
-
Permalink:
kagapa-blr/py-kannada-ascii-unicode@abbbeeb4b5552c26683b3d9b281893e37f34cfa7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kagapa-blr
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@abbbeeb4b5552c26683b3d9b281893e37f34cfa7 -
Trigger Event:
push
-
Statement type: