This article will cover a list of useful Python frameworks that can be used to develop apps and games for mobile devices. Some of these frameworks also support desktop apps or work as standalone build tools for compiling builds for both desktop and mobile devices. You can use the same code base with minor modifications to deploy apps and games to both desktop and mobile devices.
Kivy is a free and open source application and game development framework that allows you to develop apps and 2D games compatible with desktop and mobile devices. It comes with a pretty relaxed licensing scheme, giving you freedom to develop apps for commercial purposes. Main features of Kivy include support for multi-touch inputs, hardware accelerated graphics backend, many pre-defined GUI widgets, custom widgets, its own unique design language “kv” suitable for rapid prototyping, and ability to build packages for desktop operating systems and mobile devices like Android and iOS.
You can find detailed documentation for Kivy available here. Kivy has been packaged for many Linux distributions. You can search for its packages in default repositories using the package manager. You can also get the latest build of Kivy by following instructions available here.
BeeWare is another free and open source application development framework based on Python. At its core, it works on the “write once – deploy everywhere” idea. You can use the same codebase to develop and build apps for both desktop and mobile operating systems. Apps developed using BeeWare integrate well with platforms and preserve the native, platform specific look and feel. BeeWare also has pretty relaxed licensing terms, so you can use it for commercial projects. Main features of BeeWare include API for accessing native GUI widgets, API for accessing platform specific libraries, ability to deploy apps on multiple platforms and so on.
Pyqtdeploy is not an application development framework. It provides a set of tools that allows you to package your PyQt application for various platforms, including desktop and mobile devices (Android and iOS). Pyqtdeploy can package GUI apps, CLI apps and libraries as well. It can also be used for building packages for Python apps that don’t use PyQt libraries. Pyqtdeploy is licensed under BSD license, allowing you to use it for commercial projects.
Python-for-android or p4a is a set of tools that can be used to package Python apps for the Android platform. It features a robust build toolchain, allowing you to create “apk” files for Android that can be even published on Play Store. Python-for-android was mainly developed as a packaging utility for Kivy apps, but now it has grown considerably and allows packaging of other Python based apps as well. Other main features of Python-for-android include support for building packages for multiple architectures, build recipes, support for packaging apps developed using SDL2 libraries and so on.
Ren’Py is a free and open source tool that can be used for developing visual novels for both desktop and mobile devices (Android and iOS). Based on Python, it features a graphical project management tool as well command line utilities to develop your own games. Besides visual novels, you can also use it to create simulation and RPG games using its scripting system. Other main features of Ren’Py includes an asset management API, dialog script API, multi-touch support, auto-save support, supports fast-forwarding scenes, supports rewinding scenes, supports skipping scenes, gamepad support, pre-defined animation and transitions, custom animations and transitions, and so on.
Python is an extremely versatile programming language with a huge library of built-ins. It can be used for developing applications for almost any type of requirement, for any field. Unfortunately as far as mobile development is concerned, it seems Python is not very popular and hasn’t picked up pace as compared to other programming languages. There are very few development frameworks and toolchains that allow you to create and deploy apps on mobile platforms.