Acryme
Write less. Do more.
Acryme (v0.1.0) is a minimal, Python-compatible language: same grammar as Python, with every keyword and a few operators shortened. Programs transpile to Python ("Pyhn") and run on the Python runtime.
diem = 8
i diem >= 8:
pnt("Giỏi")
el diem >= 5:
pnt("Khá")
els:
pnt("Trung bình")
Install / run
pip install acryme
That puts an a command on your PATH — no python3 prefix needed:
a # interactive REPL — just start typing Acryme
a examples/grade.ac # run a file directly, no subcommand needed
a rn main.ac # same as above, spelled out
a bd main.ac # build: transpile to main.py
a cp main.ac # compile (alias of bd for v0.1)
a db main.ac # debug: print tokens, AST, generated Pyhn, then run
a fmt main.ac # format a file in place (2-space indent)
a v # version
a h # help
Running a with no arguments starts a REPL: type a line and it runs
immediately (variables persist across lines); end a line with : to
start a block, keep typing it indented yourself, and a blank line
runs the whole block. exit or Ctrl-D quits.
Without installing
Not on PyPI yet, or just trying it locally? Clone/download this repo and run it straight from source with plain Python 3, no install step:
python3 -m acryme.cli rn examples/grade.ac
or install it from the local checkout with pip install . (or
pip install -e . for an editable install while developing) to get
the same a command as above.
Keyword table
| Acryme | Pyhn/Python | Acryme | Pyhn/Python | |
|---|---|---|---|---|
i |
if |
fn |
def |
|
el |
elif |
ret |
return |
|
els |
else |
cls |
class |
|
wh |
while |
imp |
import |
|
fr |
for |
frm |
from |
|
n |
in |
pnt() |
print() |
|
T / F / N |
True / False / None |
& ` |
!` |
i, n, fn, etc. are soft keywords — they only act as keywords at
the start of a statement (or right after a fr ... n ...), so they
can still be used as ordinary variable names elsewhere, exactly as in
the spec's own fr i n range(3): example.
Everything else (operators, numbers, strings, f-strings, lists, dicts, tuples, comments, indentation-based blocks) is plain Python syntax, unchanged.
What's implemented (P0, done)
.ac files, a rn, variables (=, += etc.), pnt, i/el/els,
wh, fr/n, fn/ret, arithmetic and comparisons, &/|/!,
strings/f-strings, lists/dicts/tuples, classes with inheritance,
imp/frm ... imp, 2-space indentation, main.ac:line:col error
reporting with a source-line caret (no raw Python tracebacks for
syntax errors), and Acryme → Pyhn transpilation.
What's implemented (P1, partial)
cls, imp/frm ✅. a fmt works but does not yet preserve
comments or original parenthesization. a bd/a cp write a .py
file next to the source.
Not implemented (P2, by design)
Acryme-native try/except keywords (tr/ex/fin/ras — Acryme
currently accepts plain Python try:/except: if you write it),
the bytecode VM, an optimizer, and a package manager. Per the spec:
don't build the spaceship before the wheel turns.
Architecture
main.ac -> Lexer -> Parser -> AST -> Acryme->Pyhn codegen -> exec()
src/acryme/lexer.py— tokenizer (INDENT/DEDENT, strings incl. f-strings, comments, soft keywords).src/acryme/parser.py— recursive-descent parser producing an AST.src/acryme/ast_nodes.py— AST node types.src/acryme/codegen.py— AST → Python source.src/acryme/formatter.py— AST → canonical Acryme source (fora fmt).src/acryme/errors.py—file:line:colerror type with a caret render.src/acryme/cli.py— theasubcommands and REPL;a = acryme.cli:mainis registered as the installed console script inpyproject.toml.
Examples
See examples/hello.ac and examples/grade.ac (the spec's own test
case — running it prints Khá / Khá / Giỏi, matching section 23).
Publishing to PyPI (for maintainers)
python3 -m pip install --upgrade build twine
python3 -m build # makes dist/acryme-0.1.0.tar.gz + .whl
python3 -m twine upload dist/* # asks for your PyPI API token
You'll need a free account at https://pypi.org, and an API token from
https://pypi.org/manage/account/#api-tokens (use it as the username
__token__ when twine asks). It's worth doing a python3 -m twine upload --repository testpypi dist/* against https://test.pypi.org
first to check everything installs cleanly before publishing for
real — package names on PyPI are first-come-first-served and can't be
reused once taken, even if you delete the release.
Release files for acryme 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| acryme-0.1.0.tar.gz | 16.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| acryme-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.9 kB
Release files / acryme-0.1.0.tar.gz
| Download URL | acryme-0.1.0.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b598bb4014be85983af2d94c11708ee54a2aab4cfa0a3860a9c445d6b6d50f6
|
|
BLAKE2b-256 checksum How to use checksums |
41a7186d9667d314935f393e89df0f7dd03f2258fbdeaa000cbc4adde58d66f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logRelease files / acryme-0.1.0-py3-none-any.whl
| Download URL | acryme-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7091644a2fb75b36e298c3e12a2099aca7290f117c90c95597c805f583899188
|
|
BLAKE2b-256 checksum How to use checksums |
5d01a670d65a42c60bc3056e30cd1f9f8eac9974d7ebf536297cd8013a0b3a44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency log