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/alphacrack/python-maithili-dsl.git
cd python-maithili-dsl
🔧 Install CLI Tool (cross-platform)
pip install .
Now you can run Maithili scripts using either entry point:
python_maithili examples/hello.dmai
# or, without installing the console script:
python -m maithili_dsl examples/hello.dmai
✅ Works on Mac, Windows, and Linux, on Python 3.10 – 3.12.
See examples/README.md for a description of every bundled example program.
📄 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:
⚠️ त्रुटि: कोनो नाम घोषित नहि अछि।
🔐 Security
.dmai scripts are executed in a sandbox: a restricted __builtins__
mapping (no exec / eval / open / compile / breakpoint) and a
module import whitelist mapped from MAITHILI_MODULES. Raw Python
import statements that weren't translated from Maithili names are
rejected before execution.
To report a vulnerability, see SECURITY.md.
🧪 Testing
Contributions are expected to come with tests. Run the full suite:
pip install -r requirements-dev.txt
pytest -v --cov=maithili_dsl --cov-report=term-missing
Coverage gates: ≥85% overall, ≥90% on cli.py, transpile.py, and
linter.py. See CONTRIBUTING.md for the full
workflow.
🤝 Contributing
See CONTRIBUTING.md to learn how you can help build and improve this DSL.
Good entry points are issues labeled
good first issue.
This project follows the Contributor Covenant Code of Conduct.
📄 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
while(जबतक) andtry/except(प्रयास/अपवाद) keywords- Type hints and
mypyin CI
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.4.0.tar.gz.
File metadata
- Download URL: python_maithili-0.4.0.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb382dcfaf5c80eed55c71a5bb76b0e1780189a3a2efbad343b03af113c3140f
|
|
| MD5 |
c0146681d258476af2e702e0ede9f824
|
|
| BLAKE2b-256 |
798fc8f704c7f2e1b0d8a1209eb85591ddbf43f6b3fe7c5e8fac6342505f77ee
|
Provenance
The following attestation bundles were made for python_maithili-0.4.0.tar.gz:
Publisher:
publish.yml on alphacrack/python-maithili-dsl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_maithili-0.4.0.tar.gz -
Subject digest:
cb382dcfaf5c80eed55c71a5bb76b0e1780189a3a2efbad343b03af113c3140f - Sigstore transparency entry: 2228117639
- Sigstore integration time:
-
Permalink:
alphacrack/python-maithili-dsl@1abf16dbefc3ea6440cb43c4ab6fa8b0c1e07301 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/alphacrack
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1abf16dbefc3ea6440cb43c4ab6fa8b0c1e07301 -
Trigger Event:
release
-
Statement type:
File details
Details for the file python_maithili-0.4.0-py3-none-any.whl.
File metadata
- Download URL: python_maithili-0.4.0-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fcce95f408c71d534dc9822d753253747957d8f2023949ae2f5ef13d8068d1b
|
|
| MD5 |
639bbcb3b47d20e3acb2549eb03f59a3
|
|
| BLAKE2b-256 |
feff1607dc3dc352499728a694d0ec3408b66d996d27263014e422b90982ea3a
|
Provenance
The following attestation bundles were made for python_maithili-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on alphacrack/python-maithili-dsl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_maithili-0.4.0-py3-none-any.whl -
Subject digest:
8fcce95f408c71d534dc9822d753253747957d8f2023949ae2f5ef13d8068d1b - Sigstore transparency entry: 2228118293
- Sigstore integration time:
-
Permalink:
alphacrack/python-maithili-dsl@1abf16dbefc3ea6440cb43c4ab6fa8b0c1e07301 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/alphacrack
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1abf16dbefc3ea6440cb43c4ab6fa8b0c1e07301 -
Trigger Event:
release
-
Statement type: