PocketPy IDE is an ultra-fast, lightweight, cross-platform Python IDE and standalone runtime powered by the embeddable PocketPy C11 engine with over 160+ native system, network, crypto, and hardware extensions.
Every single script, network service, and system command runs identically across Android, Windows, and Linux.
While traditional Python mobile distributions (like Chaquopy or Termux CPython) require massive 80β120 MB downloads and suffer from sluggish interpreter cold starts, PocketPy IDE delivers full script execution, live syntax highlighting, an ANSI streaming terminal, HTML5/SVG visualization, and comprehensive system control in an astonishing 2.94 MB APK footprint with sub-20ms instant boot. On Windows, the entire standalone CLI compiler and runtime packs all 160+ native functions into a tiny ~359 KB binary.
Pre-compiled, signed binaries and packages are built automatically via CI/CD for every release:
| Platform | Download | Format | Description |
|---|---|---|---|
| π± Android | PocketPy-IDE-2.0.apk | APK (2.94 MB) | Complete IDE with Material 3 Compose UI, Code Editor, ANSI Terminal & WebView |
| πͺ Windows x64 | pocketpy-windows-x64.zip | ZIP (~359 KB) | Standalone pocketpy.exe CLI runner with native Winsock2, Win32 I/O & Win32 APIs |
| π¦ All Releases | GitHub Releases Overview | Release Assets | Release notes, source code, and artifacts for all versions |
- πͺΆ Ultra-Lightweight Footprint:
- Android APK shrunk from 18 MB down to 2.94 MB via ProGuard/R8 optimization and amalgamated C11 native compilation.
- Windows executable is a self-contained single
.exeof only ~750 KB (uncompressed) with zero external DLL dependencies.
- β‘ Blazing Execution Speed & Instant Cold Start:
- Sub-20ms boot time with minimal memory footprint (< 30 MB RAM).
- Direct C-level function bindings without Python reflection overhead.
- π 160+ Native Extensions (100% Cross-Platform):
- Sockets, POSIX/Win32 filesystem, low-level file descriptors, hardware telemetry, cryptography, binary packing, SQLite3, and extended math.
- π§ͺ 100% Test Coverage:
- Exhaustive automated test suite (
tests/test_full_suite.py) validating all 142 core test assertions across Android, Windows MSVC, and Linux.
- Exhaustive automated test suite (
- βοΈ Mobile Code Editor:
- Real-time Python syntax highlighting (keywords, built-ins, string literals, numbers, comments).
- Quick-access programming symbol bar (
:,(,),[,],{,},_,=,",',#,tab).
- π Real-Time ANSI Terminal:
- Unbuffered stdout/stderr streaming directly from native C11 execution hooks.
- ANSI color parser with live execution timer, Clear, and Copy tools.
- π Visual HTML5/SVG Output:
- Dedicated interactive WebView tab for dashboards, SVG diagrams, and web apps.
| Module | Native Functions | Windows Equivalent | Description |
|---|---|---|---|
socket |
20 APIs | Winsock2 (WSAStartup, SOCKET, closesocket) |
TCP Client/Server (bind, listen, accept), UDP (sendto, recvfrom), timeouts, non-blocking I/O, setsockopt(SO_REUSEADDR). |
os & os.path |
50+ APIs | Win32 CRT (_mkdir, _rmdir, FindFirstFileA, _open, _pipe) |
Directory & file management, low-level file descriptors (open, read, write, fsync), environment variables, and cross-platform path manipulation (nt vs posix). |
sysinfo |
15 APIs | GlobalMemoryStatusEx, GetTickCount64, GetSystemInfo |
RAM total/free/avail, system uptime, processor count, storage capacity, and hardware model inspection. |
time |
12 APIs | QueryPerformanceCounter, GetSystemTimeAsFileTime, Sleep |
Monotonic & high-resolution performance counters, timestamps (time, time_ns), timezone detection, and localtime/gmtime/strftime. |
device / hardware (compat: android) |
15 APIs | Win32 Fallbacks (Beep(), GetSystemPowerStatus()) |
Cross-platform hardware control: Battery status/charging, Toast/balloon alerts, haptic feedback, audio beep, notifications, TTS speech, clipboard get/set. |
hashlib |
12 APIs | Pure C11 (portable) | Modbus CRC-16, CRC-32, Adler-32, MD5, SHA-1, SHA-256, hex encoding/decoding, hexdump, XOR byte encryption, and cryptographic random bytes. |
struct |
15 APIs | Pure C11 (portable) | Binary packing and unpacking for signed/unsigned 8-bit, 16-bit, 32-bit integers and 32/64-bit IEEE floats (Big & Little Endian). |
storage & sqlite3 |
14 APIs | In-memory + persistent | Key-Value dictionary store and embedded SQLite3 SQL engine (CREATE, INSERT, SELECT, parameterized queries). |
math_ext |
10 APIs | C math | clamp, lerp, map_range, degrees, radians, hypot, gcd, lcm, sign, is_close. |
PocketPy includes a standalone CLI binary (pocketpy.exe on Windows or ./pocketpy on Linux):
Simply launch the binary to start the interactive prompt:
pocketpyPocketPy 2.0 (C11 Runtime with 160+ Native Extensions)
Type 'exit()' or press Ctrl+C / Ctrl+D to quit.
>>> import socket, sys, os
>>> print("Running on:", sys.platform, "OS:", os.name)
Running on: win32 OS: nt
>>> socket.gethostname()
'My-Desktop-PC'pocketpy -c "import hashlib; print(hashlib.sha256(b'hello'))"
# 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824pocketpy script.py arg1 arg2pocketpy tests/test_full_suite.py
# ================================================================
# TEST RESULTS: 142 PASSED, 0 FAILED (TOTAL: 142)
# ALL TESTS PASSED WITH 100% SUCCESS!
# ================================================================| Metric | Traditional Python (CPython/Chaquopy) | PocketPy 2.0 (C11 Core) |
|---|---|---|
| Android APK Size | ~80 MB β 120 MB | 2.94 MB (97% smaller) |
| Windows Executable | ~25 MB β 50 MB installer | ~359 KB ZIP (single self-contained .exe) |
| Cold Startup Time | 1,500 ms β 3,000 ms | < 20 ms (instant execution) |
| RAM Consumption | ~150 MB β 250 MB | ~20 MB β 30 MB |
| C Extensions | Requires compiler & headers for wheels | 160+ native functions built-in directly |
| Network & Sockets | Complex platform dependencies | Native Winsock2 & POSIX dual-stack engine |
| Ideal Use Cases | Heavy data science (numpy, pandas) |
IoT automation, Solar/Modbus tools, HTTP microservers, fast scripts, embedded utilities |
PocketPy IDE comes preloaded with production-ready sample projects:
1_pocketpy_speed_test.pyβ Benchmarks list comprehensions, iterative loops, and prime number calculations to illustrate C11 speed.2_ascii_sine_waves.pyβ Renders animated trigonometric waves in the terminal using ANSI colors andmath_ext.3_interactive_dashboard.htmlβ Responsive dark-mode HTML5/SVG status dashboard rendered live inside the Visual WebView.4_deye_reader.pyβ Industrial Modbus TCP telemetry monitor for Deye solar inverters with live register decoding.5_system_and_hardware.pyβ Diagnostic monitor inspecting CPU cores, memory utilization, disk space, and OS properties.6_device_hardware.pyβ Demonstrates cross-platform hardware control: Toast/notifications, haptic feedback, audible beeps, battery status, and TTS speech.7_mini_webserver.pyβ Embedded HTTP server running on port 8080 serving real-time system metrics to external web browsers.
PocketPy-IDE
βββ CMakeLists.txt # Top-level CMake (Windows MSVC/MinGW & Linux/macOS)
βββ tests/
β βββ test_full_suite.py # Comprehensive 142-assertion test suite
βββ app/
β βββ build.gradle.kts # Android Gradle build with R8 shrinking
β βββ src/main/
β βββ cpp/
β β βββ pocketpy.c # Core PocketPy C11 engine
β β βββ pocketpy.h # Core C API definitions
β β βββ pocketpy_ext.h # 160+ cross-platform extensions (Winsock2 & POSIX)
β β βββ pocketpy_jni.c # Android JNI bridge & unbuffered stdout hooks
β β βββ cli_main.c # Standalone CLI entrypoint (pocketpy.exe / pocketpy)
β βββ java/com/pocketpy/ide/
β βββ engine/ # PocketPy JNI wrapper & Android hardware services
β βββ ui/ # Jetpack Compose UI (Editor, Terminal, WebView, Drawer)
β βββ data/ # File management & bundled sample scripts
Prerequisites: Android Studio / SDK (API 36), Android NDK 25+, JDK 17.
git clone https://github.com/juergen874/PocketPy-IDE.git
cd PocketPy-IDE
# Make gradlew executable
chmod +x gradlew
# Build optimized release APK
./gradlew assembleReleaseThe output APK is generated at app/build/outputs/apk/release/PocketPy-IDE-2.0.apk.
Prerequisites: Visual Studio 2022 (MSVC) or MinGW (GCC/Clang), CMake 3.20+.
git clone https://github.com/juergen874/PocketPy-IDE.git
cd PocketPy-IDE
# Configure & build with CMake
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
# Test the binary
.\build\Release\pocketpy.exe tests\test_full_suite.pyPrerequisites: GCC or Clang, Make, CMake 3.20+.
cmake -B build -S .
cmake --build build
./build/pocketpy tests/test_full_suite.pyPocketPy IDE is distributed under the MIT License.
The PocketPy core engine is copyright (c) blakehuang and licensed under the MIT License.