Package a Kivy Python app into an APK for sideloading and testing on an Android device.
Build and submit a Python app to the Google Play Store as an AAB file.
Cross-compile Python packages with C extensions like numpy for Android using pre-built recipes.
Create a Python WebView app that runs a local web server displayed inside an Android shell.
Requires Android SDK and NDK installed locally, use Buildozer to simplify the build configuration and dependency management.
python-for-android (p4a) is a build tool that takes a Python application and packages it into a format that runs on Android phones and tablets. Normally Python programs cannot be installed on Android, but this tool cross-compiles the Python interpreter itself along with your app's code and bundles everything together so it can run directly on an Android device. The tool can produce three types of output files. An APK file is the standard Android install package, useful for testing or distribution through alternative app stores. An AAB file is the format required by the Google Play Store. An AAR file produces a reusable library bundle that other Android projects can depend on. All three formats support multiple CPU architectures, so a single build can cover a range of devices. The tool works well with apps built using the Kivy framework, which is a Python toolkit for building touch interfaces. It also supports PySDL2, PySDL3, and a WebView mode where your Python code runs a small web server that the app's display connects to. If your app depends on pure Python packages, those are handled automatically. For packages that include C code (like numpy or SQLAlchemy), the project ships a collection of pre-written "recipes" that handle the cross-compilation steps for you. The recommended way to use python-for-android is through a companion tool called Buildozer, which manages dependencies and centralizes configuration in a single file. However, you can also call python-for-android directly if you prefer more control. Full documentation and a quickstart guide are available on the project's ReadTheDocs site. The project is maintained by the Kivy team and accepts community contributions.
← kivy on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.