Run Python code written in Maithili using Devanagari script
Project description
README.md
📜 Devnagiri Maithili DSL
A modern Python-compatible programming DSL that lets you write code in Maithili using the Devanagari script.
🔧 Features
- ✅ Full Maithili syntax mapped to Python
- ✅ Supports OOP (classes, methods, self)
- ✅ Devanagari numerals (
०-९) - ✅ Built-in module translation (e.g.,
गणित→math) - ✅ Runtime error messages in Maithili
- ✅ Linter with style & syntax feedback in Maithili
- ✅ Command-line tool: run
.dmaifiles withpython_maithili(cross-platform)
🚀 Getting Started
📦 Installation
Clone the repo:
git clone https://github.com/youruser/maithili-dsl.git
cd maithili-dsl
🔧 Install CLI Tool (cross-platform)
pip install .
Now you can run Maithili scripts using:
python_maithili examples/hello.dmai
✅ Works on Mac, Windows, and Linux!
📄 Example: examples/person.dmai
वर्ग व्यक्ति:
कार्य नव(स्वयं, नाम):
स्वयं.नाम = नाम
कार्य बोलू(स्वयं):
छपाउ("हमर नाम " + स्वयं.नाम + " अछि।")
व्यक्ति१ = व्यक्ति("सुमन")
व्यक्ति१.बोलू()
Output:
हमर नाम सुमन अछि।
🧠 Maithili Keywords
| Maithili | Python |
|---|---|
कार्य |
def |
वर्ग |
class |
फेर करू |
return |
स्वयं |
self |
यदि |
if |
नहि त |
else |
प्रत्येक |
for |
में |
in |
सत्य |
True |
मिथ्या |
False |
शून्य |
None |
📦 Built-in Modules Mapping
| Maithili | Python |
|---|---|
गणित |
math |
समय |
time |
यादृच्छिक |
random |
तिथि |
datetime |
पुन |
re |
संग्रह |
collections |
सिस्टम |
sys |
पथ |
os.path |
ओएस |
os |
आँकड़ा |
statistics |
🧹 Linting & Errors
- ❗ Common mistakes caught before running
- ❗ Runtime errors shown in Maithili:
⚠️ त्रुटि: कोनो नाम घोषित नहि अछि।
🤝 Contributing
See CONTRIBUTING.md to learn how you can help build and improve this DSL.
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
🌐 Future Goals
- 🌍 Tirhuta script support
- 🌐 Web REPL for
.dmai - 🔌 VS Code extension
- 🧪 Unit testing + CI/CD
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 python_maithili-0.1.0.tar.gz.
File metadata
- Download URL: python_maithili-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
474f034a509eec0992deefecb6cf16936274271b728d5f137209f669a1bf7d50
|
|
| MD5 |
78bda32ec1601e3a3a8c7da1cd5146c7
|
|
| BLAKE2b-256 |
53b1a225045f28cd9ca70eb44db78cb5f401ea3772cd6fb5660c458951e3a425
|
File details
Details for the file python_maithili-0.1.0-py3-none-any.whl.
File metadata
- Download URL: python_maithili-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65190c0b3d6bd48febf90547800233b6b12ad8f1844e76ccd84511adaa1ecb54
|
|
| MD5 |
20a4fa7cad8a34abce9808e13b5e94dd
|
|
| BLAKE2b-256 |
b5751c58ae7a1a26759845f64a631166e372f041e0f0f8eef5de25741603d8aa
|