Skip to main content

MyanCode · မြန်မာကုဒ် (Python Edition)

A Burmese natural language programming language for beginners — rewritten in Python. Write code in Myanmar script — MyanCode understands it, transpiles it to Python, and runs it.

This is a Python port of the original MyanCode JavaScript implementation.


What is MyanCode?

MyanCode is a multi-paradigm programming language written entirely in the Burmese (Myanmar) language. Students write code like this:

score ကို ၇၅ အဖြစ်သတ်မှတ်ပါ
အကယ်၍ score က ၈၀ ထက်ကြီးရင်
  ပြောပါ "ဂုဏ်ထူး"
မဟုတ်ရင်
  ပြောပါ "ပျမ်းမျှ"
ပြီးပါပြီ

Which runs as:

ပျမ်းမျှ

How It Works

MyanCode uses a 6-stage NLP pipeline:

[Burmese source .myan]
        ↓
[1] Tokenizer       — splits text into typed tokens (lexical analysis)
        ↓
[2] Classifier      — identifies the intent of each line (text classification)
        ↓
[3] Extractor       — pulls out variable names, values, operators (NER)
        ↓
[4] AST Builder     — assembles lines into a nested syntax tree (syntactic parsing)
        ↓
[5] Transpiler      — converts the tree to Python (language generation)
        ↓
[6] Runtime         — executes via Python subprocess, captures output

Installation

Requires Python 3.10+.

cd myancode-python
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# or: pip install -e ".[dev]"

Usage

Run a .myan file

python src/cli.py examples/hello.myan
# or after pip install -e .
myancode examples/hello.myan

CLI options

myancode --transpile examples/hello.myan   # print generated Python
myancode --ast examples/hello.myan         # print AST JSON
myancode --repl                            # interactive REPL
myancode --ide                             # browser IDE
myancode --version

Browser IDE

Recommended (avoids conflict with the Node.js myancode on your PATH):

./myancode --ide              # from project root — always Python
# or
source scripts/activate.sh    # venv + fixes PATH vs nvm
myancode --ide
# or
.venv/bin/myancode --ide
myancode-py --ide             # after pip install -e .

Open http://127.0.0.1:3000. The editor is on top; OUTPUT, SIMULATION, and PYTHON are below. The right Chat panel writes MyanCode (needs OPENROUTER_API_KEY in .env — see .env.example).

Node vs Python myancode

If you have the old Node.js MyanCode installed (npm install -g myancode), the global myancode command opens https://myan-code.vercel.app (JavaScript IDE). The Python edition uses a local server instead.

Command What runs
myancode --ide (global) Often Node → Vercel if nvm is on PATH
./myancode --ide Python → localhost
.venv/bin/myancode --ide Python → localhost
myancode-py --ide Python → localhost (no name clash)

To remove the conflict entirely:

npm uninstall -g myancode
pip install -e .
source scripts/activate.sh
myancode --version   # should print 2.3.0

Docs

  • Tutorial — မြန်မာဘာသာ သင်ခန်းစာ
  • NLP stages — Tokenizer မှ Runtime အထိ မြန်မာဘာသာ ရှင်းလင်းချက်
  • Lesson plan — ဆရာ/ဆရာမ သင်ကြား မှတ်စု
  • Language reference — full keyword table
  • LICENSE — MIT

Project Structure

myancode-python/
├── bin/myancode
├── config/                  # keywords + error messages (dev)
├── docs/                    # tutorial + language reference
├── examples/                # sample .myan programs
├── src/
│   ├── cli.py
│   ├── engine/              # tokenizer → runner pipeline
│   │   └── data/            # packaged copy of config JSON
│   └── ide/                 # Flask IDE + public/index.html
└── tests/                   # pytest suite

Tests

source .venv/bin/activate
pytest -q

License

MIT

Download files

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

Source Distribution

myancode_python-2.3.0.tar.gz (92.1 kB view details)

Uploaded Source

Built Distribution

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

myancode_python-2.3.0-py3-none-any.whl (93.7 kB view details)

Uploaded Python 3

File details

Details for the file myancode_python-2.3.0.tar.gz.

File metadata

  • Download URL: myancode_python-2.3.0.tar.gz
  • Upload date:
  • Size: 92.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for myancode_python-2.3.0.tar.gz
Algorithm Hash digest
SHA256 eca1728d3b20f28df5d73a144fad8ad30d6a6519694eb750b15b6bdd0ad8db6d
MD5 b9104324b62f9cad570022ab78bdddfe
BLAKE2b-256 78c9ee188c116785fac4a19adc8f2779b05f3525b96e315bc3fe0e86b9464bc0

See more details on using hashes here.

File details

Details for the file myancode_python-2.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for myancode_python-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e533f3fe07f247a22b718f181ca9f3ffa2c7c3eae480bea650e3c374d302b28e
MD5 b47c351573522601278ac4b545fdfd16
BLAKE2b-256 e63c28a8a332406e00864149858dabd22aeaaf548d7ef09e7cbd773123ea9f0a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.3.0 This release

2 files

2.2.1

2 files

2.2.0

2 files

2.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page