pocketpy/pocketpy
FreePortable Python 3.x Interpreter in Modern C for Game Scripting
FreeFree tier
About pocketpy/pocketpy
pocketpy is a portable Python 3.x interpreter written in C11, designed as an alternative to Lua for game scripting. It offers elegant syntax, powerful features, and competitive performance with no dependencies beyond the C standard library, making it easy to integrate into C/C++ projects. Developers can write Python bindings via C-API or pybind11-compatible interfaces. The project includes a live Python demo, C examples in the browser, a Godot extension, a VSCode extension, a Flutter plugin, and raylib bindings. It supports multiple platforms including Windows, Linux, macOS, Android, iOS, Emscripten, Raspberry Pi OS, and Luckfox Pico SDK.
Key Features
Written in C11 with no dependencies beyond the C standard library
Portable across Windows, Linux, macOS, Android, iOS, Emscripten, Raspberry Pi OS, and Luckfox Pico SDK
Provides C-API and pybind11-compatible interfaces for binding
Includes live Python demo and C examples in the browser
Integrates with Godot Engine, VSCode, Flutter, and raylib
Supports CMake integration and single header file distribution
Pros & Cons
Pros
- Lightweight and portable with no external dependencies
- Python 3.x syntax support with competitive performance
- Easy integration via CMake or single header file
- Multiple platform support including embedded systems
- Active development with multiple extensions available
Cons
- Not a full CPython replacement; focuses on embedding and game scripting
- Limited standard library fidelity compared to CPython
- Smaller ecosystem and community compared to Lua or CPython
Best For
Game scripting as an alternative to LuaEmbedding Python in C/C++ applicationsScripting for game engines like GodotMobile app scripting via Flutter pluginDesktop and web-based scripting with raylib and Emscripten