Skip to main content

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 (.pymal files).
  • 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 .pymal scripts.
  • Customizable Keyword Map: Modify the keyword_map.json to add or change the mappings.

Table of Contents


Installation

  1. Clone this repository:

    git clone https://github.com/yourusername/PachaMalayalam.git
    cd PachaMalayalam
    
  2. Create and activate a virtual environment:

    python3 -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
    
  3. Install the package and dependencies:

    pip install .
    
  4. (Optional) Run tests to verify everything is working:

    pytest
    

Usage

  1. Write your Malayalam script: Create a .pymal file using Malayalam keywords. Example (hai_bosse.pymal):

    ചെജ്ജ് പ്രധാന():
        പരഞ്ഞോളി("ഹലോ ബോസ്!")
    പ്രധാന()
    
  2. Transpile and Execute: Run the pachalang CLI to transpile and execute:

    pachalang hai_bosse.pymal
    
  3. 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:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PachaMalayalam-0.2.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

PachaMalayalam-0.2.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

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

Hashes for PachaMalayalam-0.2.0.tar.gz
Algorithm Hash digest
SHA256 800994dc0c0b69347c25f4217f560d94641c85245c4425a3944265be2144b1d3
MD5 5f6437a85a40093aaa8a4ce1dd6bdc98
BLAKE2b-256 1bbc39fe5019642f9f0782d475c7fa32e0413dadf8361da7d8c4580bec45c759

See more details on using hashes here.

File details

Details for the file PachaMalayalam-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for PachaMalayalam-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9003923a27770453c22490e2112a3167aa97344e30d770c12ee64adf576b917
MD5 ceecc2543633967af97e765fc54cc72f
BLAKE2b-256 b73595c75a94e6505f63a4157dc0fd690943c0e7b441f587e48cee8a65324924

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