Skip to main content

🐼 RedPanda Transpiler

RedPanda Transpiler logo

A Python → Mandarin Chinese transpiler.

RedPanda is an experimental transpiler that converts standard Python syntax into readable Mandarin Chinese syntax while preserving the program's structure. It is designed for educational purposes, language learning, and experimentation with localized programming syntax.

Project Status: 🚧 Alpha (v0.1.0)


Features

  • Translate Python keywords into Mandarin Chinese
  • Translate built-in functions
  • Translate Python constants
  • Simple command-line interface
  • Lightweight with no external dependencies
  • Compatible with Python 3.11+

Example

Python

print("Hello, World!")

if True:
    print(len([1, 2, 3]))

for i in range(5):
    print(i)

Output

打印("Hello, World!")

如果 真:
    打印(长度([1, 2, 3]))

对于 i 于 范围(5):
    打印(i)

Installation

Install RedPanda Transpiler from PyPI:

pip install redpanda-transpiler

Usage

Transpile a file:

redpanda-tr input.py

Write the output to another file:

redpanda-tr input.py -o output.py

Project Structure

RedPanda-transpiler/
│
├── redpanda/
│   ├── cli.py
│   ├── loader.py
│   ├── transpiler.py
│   ├── __main__.py
│   ├── __init__.py
│   └── data/
│       ├── keywords.json
│       ├── builtins.json
│       └── constants.json
│
├── pyproject.toml
├── README.md
├── LICENSE
└── setup.py

Supported Translations

Keywords

Python Mandarin
if 如果
else 否则
elif 否则如果
for 对于
while 当
def 定义
class 类
return 返回
import 导入
from 从
as 作为
try 尝试
except 异常
finally 最后

Built-ins

Python Mandarin
print 打印
input 输入
len 长度
range 范围
list 列表
dict 字典
tuple 元组
set 集合

Constants

Python Mandarin
True 真
False 假
None 空

Roadmap

  • Command-line interface
  • Keyword translation
  • Built-in translation
  • Constant translation
  • Tokenizer-based transpiler
  • AST-based transpiler
  • Reverse transpiler (Mandarin → Python)
  • Comment translation
  • Docstring translation
  • F-string support
  • Package import translation
  • Comprehensive unit tests
  • CI/CD with GitHub Actions

License

This project is licensed under the Apache License 2.0.

See the LICENSE file for details.


Disclaimer

RedPanda is an experimental project intended for education and research. The generated Mandarin syntax is not executable by the standard Python interpreter. It must be converted back to standard Python or interpreted by a compatible tool.


Author

fmasterpro27

GitHub: https://github.com/Fmasterpro27


If you find this project useful, consider giving it a ⭐ on GitHub!

Metadata

Release files for RedPanda-transpiler 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for RedPanda-transpiler 0.1.0
File Size Uploaded Provenance Actions
redpanda_transpiler-0.1.0.tar.gz 10.3 kB Without provenance Details for redpanda_transpiler-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for RedPanda-transpiler 0.1.0
File Interpreter ABI Platform Actions
redpanda_transpiler-0.1.0-py3-none-any.whl Python 3 none any Details for redpanda_transpiler-0.1.0-py3-none-any.whl

Total release size: 21.5 kB

Release files / redpanda_transpiler-0.1.0.tar.gz

Download URL redpanda_transpiler-0.1.0.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8cb7881aee69db8c065de952ba2564935b60286eb82e3ed54b924def853a39c9
BLAKE2b-256 checksum
How to use checksums
2fdb57afa008bfb3691c34c41073e91c1794cb20f20d49c171eec9eb019f9b75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / redpanda_transpiler-0.1.0-py3-none-any.whl

Download URL redpanda_transpiler-0.1.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad7043621dfccb2760b5fcb26ef15cd0eaed43700b0900abd1bd858293c4ab70
BLAKE2b-256 checksum
How to use checksums
b13e6f6c98d03bb248f09d2cf151d892e9495887899c2f872d4904ac224154a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Security for RedPanda-transpiler 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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