MCPcopy Index your code
hub / github.com/kivy/python-for-android

github.com/kivy/python-for-android @v2026.05.09

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2026.05.09 ↗ · + Follow
1,702 symbols 6,543 edges 284 files 537 documented · 32% updated 1d agov2026.05.09 · 2026-05-10★ 8,885148 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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.

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

PyPI - Version PyPI - Python Version

Unit tests & build apps Coverage Status Docker

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.

Core symbols most depended-on inside this repo

format
called by 509
pythonforandroid/logger.py
shprint
called by 233
pythonforandroid/logger.py
get_build_dir
called by 170
pythonforandroid/recipes/openssl/__init__.py
get_recipe
called by 118
pythonforandroid/recipe.py
current_directory
called by 99
pythonforandroid/util.py
ensure_dir
called by 57
pythonforandroid/util.py
get_bootstrap
called by 41
pythonforandroid/bootstrap.py
autoclass
called by 39
pythonforandroid/recipes/android/src/android/permissions.py

Shape

Method 984
Class 365
Function 220
Route 133

Languages

Python100%

Modules by API surface

pythonforandroid/recipe.py119 symbols
tests/test_prerequisites.py98 symbols
pythonforandroid/recipes/android/src/android/mixer.py54 symbols
pythonforandroid/toolchain.py47 symbols
pythonforandroid/prerequisites.py47 symbols
tests/test_bootstrap.py45 symbols
tests/test_patching.py44 symbols
tests/test_logger.py39 symbols
testapps/on_device_unit_tests/test_app/tests/test_requirements.py38 symbols
pythonforandroid/build.py36 symbols
tests/test_recipe.py35 symbols
pythonforandroid/recipes/android/src/android/activity.py34 symbols

Dependencies from manifests, versioned

Sphinx7.2.6 · 1×
furo2023.9.10 · 1×

For agents

$ claude mcp add python-for-android \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact