A transpiler for writing Python code using Malayalam keywords
Project description
PachaMalayalam
PachaMalayalam is a Python-based transpiler that allows you to write Python code using Malayalam keywords. It transforms Malayalam-based Python-like scripts (.pymal) into executable Python code, enabling developers to code in a language close to their heart and culture.
Features
- Write Python code in Malayalam: Use Malayalam keywords to write scripts (
.pymalfiles). - Transpile to Python: Automatically convert Malayalam scripts into standard Python code.
- Execute Transpiled Code: Run the transpiled Python code seamlessly.
- Easy-to-Use CLI: A command-line interface for transpiling and executing
.pymalscripts. - Customizable Keyword Map: Modify the
keyword_map.jsonto add or change the mappings.
Table of Contents
Installation
-
Clone this repository:
git clone https://github.com/yourusername/PachaMalayalam.git cd PachaMalayalam
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the package and dependencies:
pip install .
-
(Optional) Run tests to verify everything is working:
pytest
Usage
-
Write your Malayalam script: Create a
.pymalfile using Malayalam keywords. Example (hai_bosse.pymal):ചെജ്ജ് പ്രധാന(): പരഞ്ഞോളി("ഹലോ ബോസ്!") പ്രധാന()
-
Transpile and Execute: Run the
pachalangCLI to transpile and execute:pachalang hai_bosse.pymal -
Output:
ഹലോ ബോസ്!
Project Structure
.
├── LICENSE # License file
├── README.md # Documentation
├── hai_bosse.pymal # Example script in Malayalam
├── pachamalayalam/ # Core package
│ ├── __init__.py
│ ├── keyword_map.json # JSON file mapping Malayalam keywords to Python
│ └── transpiler.py # Core transpiler logic
├── setup.py # Packaging and installation script
└── tests/ # Unit tests for the transpiler
└── test_transpiler.py
Examples
Here's an example to demonstrate a basic if-else logic in PachaMalayalam:
അത് ചെജ്ജ് age_check(age):
അതിപ്പോ age > 18:
പരഞ്ഞോളി("നിങ്ങൾ成年മാണ്!")
അല്ലെങ്കിൽ:
പരഞ്ഞാളി("നിങ്ങൾ成年 ആകുന്നില്ല!")
Save this script in example.pymal and run:
pachalang example.pymal
Testing
To run tests and verify the functionality of the transpiler, execute:
pytest tests/
Contributing
We welcome contributions to PachaMalayalam! To contribute:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Submit a pull request explaining your changes.
License
This project is licensed under the MIT License. Feel free to use, modify, and distribute this software as per the terms of the license.
Acknowledgements
Special thanks to the Malayalam developer community for inspiring the creation of PachaMalayalam. Let's bring coding closer to our native language!
Project details
Release history Release notifications | RSS feed
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 PachaMalayalam-0.2.0.tar.gz.
File metadata
- Download URL: PachaMalayalam-0.2.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
800994dc0c0b69347c25f4217f560d94641c85245c4425a3944265be2144b1d3
|
|
| MD5 |
5f6437a85a40093aaa8a4ce1dd6bdc98
|
|
| BLAKE2b-256 |
1bbc39fe5019642f9f0782d475c7fa32e0413dadf8361da7d8c4580bec45c759
|
File details
Details for the file PachaMalayalam-0.2.0-py3-none-any.whl.
File metadata
- Download URL: PachaMalayalam-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9003923a27770453c22490e2112a3167aa97344e30d770c12ee64adf576b917
|
|
| MD5 |
ceecc2543633967af97e765fc54cc72f
|
|
| BLAKE2b-256 |
b73595c75a94e6505f63a4157dc0fd690943c0e7b441f587e48cee8a65324924
|