Loading repository data…
Loading repository data…
pikasTech / repository
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.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
PikaPython is 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.
PikaPython also known as PikaScript and PikaPy.
It's very easy to bind C function to python module with the help of Pika Pre-compiler.Only write the API of python in .pyi and the bindings are autoly generated by Pre-compiler.
Generator url: http://pikascript.com
Note: You need the Community Edition license (Now Free) to build Keil projects, and the version of Keil should be newer than v5.36.
PikaPython serial terminal, script download and package menage tool.
You can use simulation project to quick start without hardware,or use the out-of-the-box develop board Pika-Pi—Zero.

The board based on STM32G030C8T6 MCU, only 64kB Flash, 8kB RAM can run pikapython with total peripheral device (GPIO、TIME、IIC、RGB、KEY、LCD、RGB). CH340 is deployed to support USB to serial with Type-C USB, support download python script py serial, there are 4 RGB on the board and support the LCD.
🎮 MicroLink 一款集多功能于一体的嵌入式系统开发工具
⭐ pikapython Bluepill Demo In PlatformIO — Python-like REPL 🐍🔌
⏩ pika_startup_demo This program demonstrate the 5 startup methods of pikapython.
🎮 PikaPython-OpenHardware PikaPython 开源硬件
💻 pikapython-msvc-qt 移植pikapython到windows平台,基于QT,采用MSVC编译器,移植pthread库,支持多线程。
src - core code
bsp - mcu/board support
port - OS and package manager
test - unit test
document - developt document
examples - example scripts
package - packages and moudles
pikaCompiler - pre-compiler write by Rust, used to bind C function to python moudle.
pikaPackageManager - pacakge manager
| MCU | bsp | gpio | time | uart | pwm | adc | i2c | dac |
|---|---|---|---|---|---|---|---|---|
| stm32g030c8 | √ | √ | √ | √ | √ | √ | √ | |
| stm32g070cB | √ | √ | √ | √ | √ | √ | √ | |
| stm32f103c8 | √ | √ | √ | √ | √ | √ | √ | |
| stm32f103rb | √ | √ | √ | √ | √ | √ | √ | |
| stm32f103ze | √ | √ | √ | √ | √ | √ | √ | |
| stm32f103rc | √ | √ | √ | √ | √ | √ | √ | |
| stm32f401cc | √ | √ | √ | √ | √ | √ | √ | |
| stm32f411ce | √ | √ | √ | √ | √ | √ | √ | |
| stm32f407ze | √ | |||||||
| stm32f407zg | √ | |||||||
| stm32h750vb | √ | |||||||
| stm32f051r8 | √ | |||||||
| air32f103cb | √ | √ | √ | |||||
| ch582 | √ | √ | √ | √ | √ | √ | ||
| ch32v103r8t6 | √ | √ | √ | |||||
| cm32m101a | √ | |||||||
| w806 | √ | √ | √ | √ | √ | √ | √ | |
| apm32f030r8 | √ | |||||||
| apm32e103vb | √ | |||||||
| bl-602 | √ | √ | √ | √ | √ | |||
| bl-706 | √ | |||||||
| bl-618 | √ | √ | √ | √ | √ | √ | √ | √ |
| Raspberry Pico | √ | |||||||
| ESP32C3 | √ | √ | √ | |||||
| TC264D | √ | |||||||
| devc | √ | |||||||
| visual-studio | √ | |||||||
| EC600N | √ | |||||||
| mm32f5277e9p | √ | √ | ||||||
| xr806(openharmony) | √ |
| Board | bsp | gpio | uart | pwm | adc | i2c | rgb | lcd | arm-2d |
|---|---|---|---|---|---|---|---|---|---|
| Pika-Pi-Zero | √ | √ | √ | √ | √ | √ | √ | √ | √ |
| Board | bsp | pika_lvgl |
|---|---|---|
| lvgl-vs-simu | √ | √ |
| swm320 | √ | √ |
| Board | bsp | arm-2d |
|---|---|---|
| QEMU-arm2d | √ | √ |
| Board | bsp | LED | KEY |
|---|---|---|---|
| SmartLoong | √ | √ | √ |
| OS | port | GPIO | TIME | PWM |
|---|---|---|---|---|
| RT-Thread | √ | √ | √ | √ |
| vsf | √ | √ |
| OS | port | Google Test | Benchmark |
|---|---|---|---|
| linux | √ | √ | √ |
Support run in mcu without OS or file system. Can run in everywhere with RAM ≥ 4kB and FLASH ≥ 64kB,such as stm32g030, stm32f103c8t6,esp8266.
Support IDEs like Keil, IAR, RT-Thread studio and segger embedded studio to develop C moudle.
Support build tools like CMake, makeFile and Scons.
Zero dependencies, zero configuration, out-of-the-box, easy to integrated into privious C projcet.
Eazy to extern customized C moudles.
Support linux.
Support subaggregate of python 3 standard syntax.
Support class and method define, encapsulation-inheritance-polymorphism and moudles in .pyi of C module.
| Syntax | Compile-Time | Run-Time | Shell |
|---|---|---|---|
| Module Define | √ | - | - |
| Module Import | √ | √ | √ |
| Class Define | √ | √ | √ |
| Class Inherit | √ | √ | √ |
| Method Define | √ | √ | √ |
| Method Override | √ | √ | √ |
| Method Invoke | √ | √ | √ |
| Argument Define | √ | √ | √ |
| Argument Assignment | √ | √ | √ |
| Object New | √ | √ | √ |
| Object Free | √ | √ | √ |
| Object Nest | √ | √ | √ |
| Control flow | √ | √ | √ |
| + | - | * | / | == | > | < | >= | <= | % | ** | // | != | & | >> | << | and | or | not | in | += | -= | *= | /= |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ |
| Syntax | State |
|---|---|
| if | √ |
| while | √ |
| for in [list] | √ |
| for in range(a, b) | √ |
| for in [dict] | √ |
| if elif else | √ |
| for break/continue | √ |
| while break/continue | √ |
| Syntax | Python Module | C Module |
|---|---|---|
| import [module] | √ | √ |
| import [module] as | √ | - |
| from [module] import [class/function>] | √ | - |
| from [module] import [class/function>] as | √ | - |
| from [module] import * | - | PikaObj Module Only |
| Syntax | State |
|---|---|
| l = list() | √ |
| l = [a, b, c] | √ |
| d = dict() | √ |
| d = {'a':x, 'b':y, 'c':z} | √ |
| Syntax | State |
|---|---|
| try: | √ |
| except: | √ |
| except [Exception]: | - |
| except [Exception] as [err]: | - |
| except: ... else: | - |
| raise: | √ |
| raise [Exception]: | - |
| finally: | - |
| Syntax | str | bytes | list |
|---|---|---|---|
| test[i] | √ | √ | √ |
| test[a : b] | √ | √ | √ |
| test[a :] | √ | √ | √ |
| yield | is | comprehensions |
|---|---|---|
| - | √ | - |
Readability first, nearly never use macro function and global argument.
Complete unit testes based on google test.
The scripts in demos are in the examples folder.