python-for-android (p4a) is a development tool that packages Python apps into binaries that can run on Android devices.
It can generate:
Android Archive (AAR) files which can be used as a re-usable bundle of resources for other projects.
It supports multiple CPU architectures.
It automatically supports dependencies on most pure Python packages. For other packages, including those that depend on C code, a special “recipe” must be written to support cross-compiling. python-for-android comes with recipes for many of the mosty popular libraries (e.g. numpy and sqlalchemy) built in.
python-for-android works by cross-compiling the Python interpreter and its dependencies for Android devices, and bundling it with the app’s python code and dependencies. The Python code is then interpreted on the Android device.
It is recommended that python-for-android be used via Buildozer, which ensures the correct dependencies are pre-installed, and centralizes the configuration. However, python-for-android is not limited to being used with Buildozer.
Buildozer is released and distributed under the terms of the MIT license. You should have received a copy of the MIT license alongside your distribution. Our latest license is also available.
- Getting Started
- Build options
- Working on Android
- distutils/setuptools integration
- Testing an python-for-android pull request
- Contribution Guidelines
- Contact Us