Real Python - Python for mobile development?

Hey there,

What about using Python for mobile app development?

Historically, Python didn't have a strong story when it came to mobile application development.

In fact, Android and iOS development was pretty much out of the question with pure Python alone.

That's a shame—

And thankfully, there have been a number of developments in recent years that vastly improved the outlook on using Python for writing mobile apps.

So let's take a look at a few options. There are two frameworks I'd like to call out specifically:

The first framework is called Kivy. It's an open-source Python library for developing cross-platform GUI applications. 

Kivy allows you to write pure-Python graphical applications that run on the main desktop platforms (Windows, Linux, and macOS) and on iOS & Android.

Every time I hear about a new GUI toolkit I always want to know how "native" it feels—

I believe that great GUI application should play to the strengths of the platform they run on.

For example, when I'm using my iPhone I want consistency across the apps I use. It feels jarring to use an app that was designed with user interface patterns from another platform. 

Kivy comes with a custom-built UI toolkit that provides it's own versions of buttons, text labels, text entry forms, and so on. This means these widgets are not rendered using the native platform UI controls. 

On the one hand this guarantees consistency and portability of your app from one platform to another. 

But on the other hand it also means that your Android app won't really look and feel like an Android app...

This might not be a problem at all, depending on the kind of app you have in mind. 

For most games, for example, the "nativeness" of the UI isn't very important. The same is true for certain kind of niche apps like graphical MIDI controllers for making music.

But for other types of apps this has a HUGE impact on usability.

So, if you can work with a non-native UI toolkit in your apps then Kivy is a great choice. 

It allows you to write mobile applications using your Python programming skills without having to learn another platform-specific language like Swift.

You can learn more about Kivy at https://kivy.org

The second framework I want to tell you about is called the "BeeWare" project.

It offers you a set of tools and an abstraction layer you can use to write native-looking mobile and desktop applications using Python.

The key difference between Kivy and BeeWare is that BeeWare programs use the native UI toolkit of the platform they run on, whereas Kivy apps use a custom UI toolkit that uses the same controls across all platforms.

With BeeWare, the UI controls your app uses will be the buttons, check boxes, and form elements provided by the underlying operating system.

This means you can build apps that look and feel 100% native to each specific mobile (and desktop) platform.

Sounds great, right? 

The only downside is that the BeeWare project is still relatively new and currently under heavy development lead by Pythonista Russel Keith-Magee.

As with any framework that hasn't had a chance yet to mature for years this means more work for you as a developer due to (potentially frequent) API changes, bugs, and lack of features.

Nevertheless, I'd encourage you to read up on BeeWare, it's a really exciting project. You can learn more about it here: https://pybee.org/project/using/

Now, which way should you look if you want to build a mobile app with Python?

Both Kivy and BeeWare are worth considering.

And as far as maturity goes, Kivy seems to be the more mature platform right now. 

For the use cases that I'm personally the most interested in—making native-looking mobile and desktop apps with Python—I think that BeeWare will eventually gain the upper hand.

But, to be honest with you, if you're thinking about writing a great mobile app today it might not make much sense to build it with Python...

If you want the best result and use state of the art platform-specific features, your best bet will be getting comfortable with Java (Android) and Swift (iOS).

However, I believe this can and will change in the future. Python's future in the mobile dev space is looking brighter by the minute.

And with Python's rising popularity there's a great argument to be made for using it for mobile app development.

Personally, I'd *love* to have the ability to write cross-platform mobile apps with Python, simply because Python is such an enjoyable language to work with.

I'm excited to see what the possibilities will be in a year from now. 

So, if you're looking for a cool open-source project to contribute to, please consider Kivy and the BeeWare project. 

You'll help create a better future for all of us :-)

Happy (mobile) Pythoning!

— Dan Bader

Older messages

[PythonistaCafe] Why PythonistaCafe exists

Friday, January 22, 2021

Hey there, In one of my last emails I talked about how some online communities in the tech space devolve over time and turn into cesspools of negativity. This relates directly to how and why I started

[PythonistaCafe] What makes PythonistaCafe different

Thursday, January 21, 2021

Hey there, Mastering Python is *not* just about getting the books and courses to study—to be successful you also need a way to stay motivated and to grow your abilities in the long run. Many

Picking Python projects -- I'M STUCK

Sunday, January 10, 2021

Hey there, I got this question from a newsletter reader who's an entry-level Pythonista: ~~~ What's the best way of moving from a basic understanding of Python to working on real projects? And

Parallel computing in Python (in 60 seconds or less)

Friday, January 1, 2021

Hey there, If your Python programs are slower than you'd like you can often speed them up by *parallelizing* them. Basically, parallel computing allows you to carry out many calculations at the

Python side projects & getting a job

Sunday, December 20, 2020

Hey there, Where do you find inspiration for Python side projects? It's a question I often hear from Pythonistas looking to build up a portfolio they can show to potential employers. So here's

You Might Also Like

Post from Syncfusion Blogs on 11/28/2024

Thursday, November 28, 2024

New blogs from Syncfusion All Things Open 2024 Takeaways, Part 3: Freedom vs. Sustainability By Marissa Keller Outten The role of sustainability and freedom in open source was discussed at the All

Top Tech 🏆 HTC VIVE Focus Vision Review — These Clip-on Earbuds Are Simple and Sound Good

Thursday, November 28, 2024

Also: Plugable Portable Monitor Review, and More! How-To Geek Logo November 28, 2024 😎 Question Reality If you're wondering what to buy on Black Friday or during the holiday rush, this week we

Hackers Exploit Popular Game Engine to Distribute Cross-Platform Malware

Thursday, November 28, 2024

THN Daily Updates Newsletter cover Programming with GitHub Copilot: Write Better Code--Faster! ($48.00 Value) FREE for a Limited Time Accelerate your programming with the most popular AI coding tool on

Edge 452: The AI Magic Behind Google's NotebookLM Audio Features

Thursday, November 28, 2024

How does NotebookLM generate such cool podcasts? ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Check Out These Awesome Gifts!

Thursday, November 28, 2024

Let us help you check one thing off your to-do list with this guide to the best gifts for the holiday season. Make the holidays a little brighter with these great gift options. From health and wellness

🚀 Accelerate Your Growth As a Software Architect

Thursday, November 28, 2024

What students are saying about my courses More than 4300+ students already completed my courses. And they gave them a 4.9/5 ⭐ rating. I'd love to see your success story next on this wall of

🫵 Android Developer Previews Are Not For You — Virtual Reality Might Finally Be Socially Acceptable

Wednesday, November 27, 2024

Also: iPhone Camera vs. Digital SLR, and More! How-To Geek Logo November 27, 2024 Did You Know The band Radiohead was originally called "On a Friday"—the band was formed by high school

JSK Daily for Nov 27, 2024

Wednesday, November 27, 2024

JSK Daily for Nov 27, 2024 View this email in your browser A community curated daily e-mail of JavaScript news JavaScript Certification Black Friday Offer – Up to 54% Off! Certificates.dev, the trusted

Ranked | The World's Biggest Importers of Goods 🌎

Wednesday, November 27, 2024

As Trump tariffs are anticipated to disrupt global trade and push up prices for consumers, we show the world's biggest importers of goods. View Online | Subscribe | Download Our App >> 📱Book

Daily Coding Problem: Problem #1621 [Easy]

Wednesday, November 27, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Google. A regular number in mathematics is defined as one which evenly divides some