github.com/pikastech/pikascript

An ultra-lightweight Python interpreter that runs with only 4KB of RAM, zero dependencies. It is ready to use out of the box without any configuration required and easy to extend with C. Similar project: MicroPython, JerryScript.

Open this visualization on its own page →

Contributors

21

Lines of Code

83,532

From

2021-08-01

To

2022-04-20

About pikastech/pikascript

PikaPython is an ultra-lightweight Python interpreter designed to run on microcontrollers with minimal resource requirements, operating with just 4KB of RAM and zero external dependencies. The interpreter is immediately usable without configuration and integrates easily with existing C projects, making it practical for embedded systems like STM32, ESP32, and ESP8266 microcontrollers. It functions similarly to MicroPython and JerryScript but with even lower memory footprint.

The project supports a substantial subset of Python 3 syntax including classes, inheritance, methods, modules, control flow, list and dictionary operations, and exception handling. A key feature is the Pika Pre-compiler, which automatically generates C bindings for Python modules by reading API definitions from .pyi files, significantly reducing boilerplate code. The interpreter supports development through multiple IDEs including Keil, IAR, and RT-Thread Studio, and includes a serial REPL for interactive development and script downloading directly to devices.

PikaPython targets embedded developers and IoT applications, with broad hardware support across numerous microcontroller families and boards. The project includes comprehensive documentation, example applications demonstrating GPIO control, UART communication, ADC reading, PWM output, and graphical applications. It supports both bare-metal execution and integration with real-time operating systems like RT-Thread, making it versatile for industrial IoT and educational embedded systems development.

Share this video