python2ts

JSON →
library 1.4.3 ·javascript
verified May 1, 2026

python2ts is an AST-based Python-to-TypeScript transpiler that converts Python code into clean, idiomatic TypeScript while preserving type annotations and semantics. The current stable version is 1.4.3 (January 2026), with active development and frequent releases (multiple per week). It supports a wide range of Python features including dataclasses, list/dict comprehensions, pattern matching, f-strings, async/await, decorators, context managers, generators, and standard library modules via the accompanying pythonlib runtime. Unlike other transpilers, python2ts produces readable, maintainable TypeScript output with full type preservation and has minimal runtime overhead, making it suitable for migrating large Python codebases to TypeScript. Requires Node >=22.0.0.

total hits 14
actors 5 distinct systems
last hit 4d ago AhrefsBot
GPTBot
5
MetaBot
3
Script
1
ClaudeBot
1
Humans
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇬🇧 United Kingdom · 🇮🇳 India · PA