# kivy/python-for-android

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/kivy-python-for-android).**

8,888 stars · 2,038 forks · Python · MIT

## Links

- GitHub: https://github.com/kivy/python-for-android
- Homepage: https://python-for-android.readthedocs.io
- awesome-repositories: https://awesome-repositories.com/repository/kivy-python-for-android.md

## Topics

`android` `apk` `kivy` `packaging` `python`

## Description

python-for-android is a toolchain that compiles Python applications and their dependencies into installable Android APK or AAB packages. It bundles a Python interpreter and standard library into an Android package, enabling Python code to run natively on mobile devices. The project provides a recipe-based build engine that automates dependency resolution, version pinning, and custom compilation steps for Android targets.

The system cross-compiles Python and native C-extension libraries for multiple Android CPU architectures, producing separate native binaries for each target and packaging them into a single APK or AAB. It supports multiple UI frameworks through a pluggable backend layer, allowing applications to be packaged with Kivy, PySDL2, or a WebView-based interface. The build process compiles Python bytecode and C extensions into native shared libraries, then combines them with Android manifest resources into a signed distribution package.

The project includes a recipe system for defining build steps with dependency declarations, enabling automatic cross-compilation of libraries like NumPy and SQLAlchemy. It handles multi-architecture builds to ensure compatibility across a wide range of Android devices. Documentation is available through the project's site.

## Tags

### DevOps & Infrastructure

- [Python-to-Android Package Bundlers](https://awesome-repositories.com/f/devops-infrastructure/distribution-packaging/software-distribution/application-packaging/android-packages/python-to-android-package-bundlers.md) — Compiles Python applications and their dependencies into installable Android APK or AAB packages.
- [Multi-Architecture APK Builds](https://awesome-repositories.com/f/devops-infrastructure/cicd-pipeline-automation/core-build-engines/bundling-extension-architectures/build-tooling-architectures/multi-architecture-apk-builds.md) — Generates separate binaries for multiple Android CPU architectures and packages them into a single APK or AAB.
- [Android App Bundle Supports](https://awesome-repositories.com/f/devops-infrastructure/containerization/image-building/android-app-bundle-supports.md) — Compiles a Python application and its dependencies into an Android APK or AAB file for distribution. ([source](https://python-for-android.readthedocs.io/bootstraps.html))
- [Android Packages](https://awesome-repositories.com/f/devops-infrastructure/distribution-packaging/software-distribution/application-packaging/android-packages.md) — Combines compiled native libraries, Python bytecode, and Android manifest resources into a signed APK or AAB.
- [Python Android Packagers](https://awesome-repositories.com/f/devops-infrastructure/distribution-packaging/software-distribution/application-packaging/android-packages/python-android-packagers.md) — Compiles a Python application and its dependencies into an Android APK, AAB, or AAR binary that runs natively on Android devices. ([source](https://python-for-android.readthedocs.io))
- [Python Mobile App Packagers](https://awesome-repositories.com/f/devops-infrastructure/app-store-packaging/python-mobile-app-packagers.md) — Bundles Python apps with Kivy, PySDL2, or WebView UI backends into Android binaries.

### Software Engineering & Architecture

- [Android Bootstraps](https://awesome-repositories.com/f/software-engineering-architecture/python-coding-standards/android-bootstraps.md) — Bundles a Python interpreter and standard library into an Android APK, enabling Python code to run natively on the device.

### Development Tools & Productivity

- [Mobile Package Generators](https://awesome-repositories.com/f/development-tools-productivity/installer-packages/mobile-package-generators.md) — Compiles a Python application and its dependencies into an installable Android APK or AAB file. ([source](https://python-for-android.readthedocs.io/genindex.html))
- [Recipe-Based Cross-Compilations](https://awesome-repositories.com/f/development-tools-productivity/native-compilation/mobile-arm-cross-compilation/recipe-based-cross-compilations.md) — Defines build recipes with dependency declarations and custom steps to cross-compile Python libraries for Android's ARM and x86 architectures.
- [Android App Packagers](https://awesome-repositories.com/f/development-tools-productivity/python-application-packagers/android-app-packagers.md) — Compiles a Python application and its dependencies into an Android APK or AAB file for distribution. ([source](https://python-for-android.readthedocs.io/distutils.html))
- [Android Python App Compilers](https://awesome-repositories.com/f/development-tools-productivity/python-application-packagers/android-python-app-compilers.md) — Compiles Python applications and their dependencies into installable Android APK or AAB packages.
- [Recipe-Based Builds](https://awesome-repositories.com/f/development-tools-productivity/software-package-repositories/package-recipe-contributions/recipe-based-builds.md) — Automates dependency resolution, version pinning, and custom compilation steps for Android targets via recipes.
- [Build Recipes](https://awesome-repositories.com/f/development-tools-productivity/software-packaging/build-recipes.md) — Defines build recipes with dependency declarations and custom steps for cross-compiling Python libraries to Android.

### Mobile Development

- [Python App Builds for Android](https://awesome-repositories.com/f/mobile-development/android-applications/android-app-execution/android-app-downloads/python-app-builds-for-android.md) — Compiles a Python application and its dependencies into an Android APK or AAB package ready for distribution. ([source](https://python-for-android.readthedocs.io/quickstart.html))
- [Android Architecture Support](https://awesome-repositories.com/f/mobile-development/android-architecture-support.md) — Builds the packaged app for different Android CPU architectures so it runs on a wide range of devices. ([source](https://python-for-android.readthedocs.io))
- [Pluggable UI Backend Bundlers](https://awesome-repositories.com/f/mobile-development/cross-platform-frameworks/flutter/native-backend-uis/pluggable-ui-backend-bundlers.md) — Packages apps with Kivy, PySDL2, or WebView backends, enabling framework choice for Android deployment.

### Operating Systems & Systems Programming

- [Python Android Cross-Compilation Frameworks](https://awesome-repositories.com/f/operating-systems-systems-programming/platform-development-integration/platform-integrations/android-build-configurations/native-build-pipelines/dockerized-android-builds/android-ndk-cross-compilation/python-android-cross-compilation-frameworks.md) — Cross-compiles Python and native C-extension libraries for multiple Android CPU architectures.
- [Python Cross-Compilation Pipelines](https://awesome-repositories.com/f/operating-systems-systems-programming/platform-development-integration/platform-integrations/android-build-configurations/native-build-pipelines/dockerized-android-builds/android-ndk-cross-compilation/python-cross-compilation-pipelines.md) — Cross-compiles Python and native C-extension libraries specifically for Android CPU architectures.

### Programming Languages & Runtimes

- [Ahead-Of-Time Compilation](https://awesome-repositories.com/f/programming-languages-runtimes/ahead-of-time-compilation.md) — Compiles Python bytecode and C extensions into native shared libraries during the build process.
- [Android App Compilers](https://awesome-repositories.com/f/programming-languages-runtimes/python-compilers/android-app-compilers.md) — Packages a Python application and its dependencies into an installable Android APK or AAB file. ([source](https://python-for-android.readthedocs.io/apis.html))
- [Python C-Extension Cross-Compilations](https://awesome-repositories.com/f/programming-languages-runtimes/c-and-c-cross-compilation/python-c-extension-cross-compilations.md) — Cross-compiles C-extension dependencies automatically when a recipe is provided, enabling use of libraries like NumPy and SQLAlchemy. ([source](https://python-for-android.readthedocs.io))

### Part of an Awesome List

- [UI Backend Bundles](https://awesome-repositories.com/f/awesome-lists/devtools/alternative-backends/ui-backend-bundles.md) — Packages the app using Kivy, PySDL2, or a WebView-based backend to match the chosen user interface framework. ([source](https://python-for-android.readthedocs.io))

### User Interface & Experience

- [UI Backend Abstractions](https://awesome-repositories.com/f/user-interface-experience/cross-platform-ui-abstractions/plugin-based-backend-abstractions/ui-backend-abstractions.md) — Supports multiple UI frameworks (Kivy, PySDL2, WebView) by abstracting the windowing and event loop into a pluggable backend layer.
