Home

Awesome

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

Backers on Open Collective Sponsors on Open Collective GitHub contributors Contributor Covenant

PyPI - Version PyPI - Python Version

Unit tests & build apps Coverage Status

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

<img src="https://contrib.nn.ci/api?repo=kivy/python-for-android&pages=5&no_bot=true&radius=22&cols=18">

Backers

Thank you to all of our backers! 🙏 [Become a backer]

<img src="https://opencollective.com/kivy/backers.svg?width=890&avatarHeight=44&button=false">

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.

<!--- See https://github.com/orgs/kivy/discussions/15 for explanation of this code. -->

<a href="https://opencollective.com/kivy/sponsor/0/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/kivy/sponsor/1/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/kivy/sponsor/2/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/kivy/sponsor/3/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/3/avatar.svg"></a>

<a href="https://opencollective.com/kivy/sponsor/4/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/kivy/sponsor/5/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/kivy/sponsor/6/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/kivy/sponsor/7/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/7/avatar.svg"></a>

<a href="https://opencollective.com/kivy/sponsor/8/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/kivy/sponsor/9/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/9/avatar.svg"></a> <a href="https://opencollective.com/kivy/sponsor/10/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/10/avatar.svg"></a> <a href="https://opencollective.com/kivy/sponsor/11/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/11/avatar.svg"></a>

<a href="https://opencollective.com/kivy/sponsor/12/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/12/avatar.svg"></a> <a href="https://opencollective.com/kivy/sponsor/13/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/13/avatar.svg"></a> <a href="https://opencollective.com/kivy/sponsor/14/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/14/avatar.svg"></a> <a href="https://opencollective.com/kivy/sponsor/15/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/15/avatar.svg"></a>