python-for-android Documentation

Turn your Python application into an Android APK

8,899 stars Python Python 1 file Β· ~1,289 tokens #android#apk#kivy#packaging#python
RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy python-for-android on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name python-for-android --restart always kivy/python-for-android:latest

python-for-android

python-for-android (p4a) is a development tool that packages Python apps into
binaries that can run on Android devices.

It can generate:

It supports multiple CPU architectures.

It supports apps developed with Kivy framework, but was
built to be flexible about the backend libraries (through "bootstraps"), and
also supports PySDL2, PySDL3 and a
WebView with
a Python web server.

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 most 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.







Documentation

More information is available in the
online documentation including a
quickstart guide.

python-for-android is managed by the Kivy team.

Support

Are you having trouble using python-for-android or any of its related projects
in the Kivy ecosystem?
Is there an error you don’t understand? Are you trying to figure out how to use
it? We have volunteers who can help!

The best channels to contact us for support are listed in the latest
Contact Us
document.

Code of Conduct

In the interest of fostering an open and welcoming community, we as
contributors and maintainers need to ensure participation in our project and
our sister projects is a harassment-free and positive experience for everyone.
It is vital that all interaction is conducted in a manner conveying respect,
open-mindedness and gratitude.

Please consult the latest Code of Conduct.

Contributors

This project exists thanks to
all the people who contribute.
[Become a contributor].

Backers

Thank you to all of our backers!
πŸ™ [Become a backer]

Sponsors

Special thanks to
all of our sponsors, past and present.
Support this project by
[becoming a sponsor].

Here are our top current sponsors. Please click through to see their websites,
and support them as they support us.