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.2.1

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.2.1.tar.gz (65.2 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.2.1-py3-none-any.whl (66.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: myancode_python-2.2.1.tar.gz
  • Upload date:
  • Size: 65.2 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.2.1.tar.gz
Algorithm Hash digest
SHA256 eb4fde45322b984d26c8db987356e1c58e39f55d95eaf5465902ca0fb2eb029d
MD5 86f55b88d84e7e7549f15bc86ce27e4e
BLAKE2b-256 21f745d06fa04b358ab1816df4692cd508e4ecf409a58623a4b30219628905b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for myancode_python-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa8acd6b9339af857f2f818eebf6df0436eccc5ae848a5cb030b4020a0ac8564
MD5 51b4d141be55b3364b5465f8f0dad5a4
BLAKE2b-256 cc03e5b962effb3b68b8e07ba1451e5f279c65c409e2e151a5de645ff8436604

See more details on using hashes here.

Release history Release notifications | RSS feed

2.3.0

2 files

This release

2.2.1 This release

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