I built a typed superset of Python that compiles to standard .py — would you use it?

Posted by unadlib@reddit | Python | View on Reddit | 25 comments

TypePython

Repo: type-python/type-python

I've been working on TypePython — a statically-typed authoring language that compiles .tpy files to standard Python .py + .pyi. No custom runtime. No vendor lock-in. The output works with mypy, pyright, ty, and any standard Python tooling.

The core idea: type checkers verify your annotations; TypePython gives you a better syntax to write them in.

you write .tpy → TypePython compiles → .py + .pyi → ty / pyright / mypy checks