Support unavailable
Please try again later

Developing Android Apps completely in Python

by Thomas Perl for EuroPython 2012

The goal of this training is to show you how to start developing full Android applications using only Python. Different technologies will be demonstrated, including PySide-based QML GUIs using the Necessitas Qt port and the Py4A/SL4A-based approach, which can be combined with Android’s WebKit and re-use Python web frameworks.

While Android already has a good SDK out of the box, being able to use Python instead of Java is a big advantage for some developers - it allows for quicker turnaround times, and reuse of Python libraries. Python on Android uses a native CPython build, so its performance and compatibility is very good. Combined with PySide (which uses a native Qt build) and Qt’s support for OpenGL ES acceleration, you can create fluent UIs even with Python.

The resulting PySide-based applications run on Android, but also at least on Mac OS X, Windows, Linux and Maemo and MeeGo - basically all platforms on which Qt is available. The SL4A/Py4A-based applications will run on Android only, but will be able to utilize Android-specific APIs. Both approaches can also be combined.



  1. Gravatar
    Android is dominating the world of smartphones. This post would be definetely useful for Android developers


  2. Gravatar
    Web apps are hot today, many companies are using html5 apps for their businesses. But hiring a developer is too expensive. I used to make really cool html5 apps and so fast! Takes a few minutes and the live app is right there in front of you! The easiest and fastest way to get not only web but also native apps.
  3. Gravatar
    Great video. I want to create android app with python because is my favouritye language to develop
  4. Gravatar
    Android developers are pretty much in demand because of user needs for new unique applications. Its good that developers can now themselves reply to user reviews. ~keep posting
  5. Gravatar
    I will like to develop android apps with python because it is simple
  6. Gravatar
  7. Gravatar
    Nice tutorial .Very helful
  8. Gravatar
  9. Gravatar
    Finally python on android. frankly I did not want to make java if not at school
  10. Gravatar
    I am very interested in using python on android nachines, but insist on bypassing Google and the NSA where possible.
    If that proves too hard, no more android for me. The tablets are very handy and i have some niche applications for it, where it is essential that no third parties aka google or NSA are involved, not even through a back door. Otherwise patient privacy cannot be guaranteed and CE-approvel can not be obtained.
  11. Gravatar
    I think Iphones are even worse after the recent articles that came out.
  12. Gravatar
    uh, what makes you say iPones are even worse? In software, hardware, etc? The hardware in iPhones are the best in the world, security is virutally unpenetratable, you don't even need a anti-virus for anything Apple has ever made up from the early 90's. the iphone never had to and it's the most perfect phone in the world, the most desired, the most valuable company in the world, yet we get angry jealous and belligerent ghouls like you who are Android or Microsoft zombies who know null about technology. You read the nonsense Apple jealous writers out there and get fans of Google to talk lies and deceit at them so that people would buy cheaper yet crappier and poorly designed Android, Windows, Blackberry, Samsung when all they are doing are raping Apple's ideas and design (stealing) and then produce virtually carbon copies of them so that Google and others cannot lose their jobs. But, you usally get what you pay for. You pay more and get more, not the other way around. You know, the ones that are priced less, are nothing but "knockoffs" of the real thing-- ie louis vuitton is often counterfeited by Chinese. Food for thought., dude. Eat your Apple now.
  13. Gravatar
    Another example:

    BMW makes their own luxury cars, and doesn't make buses, taxis, minivans, and other bizarre types of vehicles in their lineup. They make super strong, super high performance, high efficiency engines, super sexy and wild to drive and much coveted. Everyone wants one, but not all can afford one. Yet you see people in America always cursing and loathing BMW drivers for being arrogant, jerks, bad drivers and think they are rich snobs when in reality the BMW haters are the arrogant bad jerk drivers. it's all about jealously they are trying to tell people so people would not buy their cars. Quality luxuries are both loved and both hated. Copies and poorly designed fakes are just hated by even by the ones who own them, they only pretend to like them only because they think they save money or try to appear to be more geeky, nerdy, or more intelligent then the superior ones. Food for thought.
  14. Gravatar
    So I should just pay more to be able to enjoy all of my new iPhone limitations.. Yes, it's fast, stable and good phone, but its what-you-see-is-what-you-get phone, and your android works the way you make it work, so it's not about geekiness or superiority, it's about people meeting their needs. The day that i decide to use mobile phone for "phone stuff" only, is the day I'll go and buy an iPhone. For now, i'll just stick to using my phone as an portable IDE instead of using it as a status symbol.
  15. Gravatar
    I think your moronic rant just gave me cancer.

    Thanks for that.
  16. Gravatar
    buag! Iphone its very expensive! hardware and software propietary. You don't look reality process in your system. Every body controlled. Solution made your system.
  17. Gravatar
  18. Gravatar
    Lol at that bias comment
  19. Gravatar
    I would like to point out that NOTHING is immune to viruses THE ONLY reason why andriod/iphone/linux does not have a huge virus problem IS because not many people build viruses for them they usually go for the windows platform but that doesn't make it virus free like i said its not possible nothings perfect sorry to burst your bubble
  20. Gravatar
    It's high time Java got replaced with scripting languages like Python or Ruby.
    It's really a big in the ass the code in Java.

    Someone should definitely make Python wrappers for the Android API.
  21. Gravatar
    Java is rapidly dying. It's soooo outdated now and super slow. Sun Microsystems is history swallowed by Oracle. Even Oracle is dying. It's not the 90's anymore. The WWW and IT is moving super light speed and yet there are some 50-70 Java engineers still proud of their work. It's like being proud of being a COBOL or BASIC or even Pascal programmer.
  22. Gravatar
    I can program in BASIC, COBOL, JAVA, PYTHON and a couple other languages. It's all about using the correct language for the job. The needs are shifting rapidly. Outhouse your IT to save costs and get what you want "so much faster", inhouse your IT again to save costs and get what you really need "so much faster. Go for clouds (mainframes getting shared by big financials institutes hosted by IBM is sooo 80s, man) step back from the cloud when some consultant tells you the truth about your data and its security.
    Directions in IT are mostly decided by people without a clue about the IT. It's the "hip" stuff that all consultants try to sell. and managers fall for it.
    Be prepared for the next hype. It will make your just learned new and hip language "old" in the blink of an eye, too.
  23. Gravatar
    Although I am long timer Java programmer, currently I am so fond of Python. And having Python option in Android programming, will be an awesome challenge

    Great video!
  24. Gravatar
    Thanks for sharing this good article. .
  25. Gravatar
    I think python is more compatible for Android apps then java.
  26. Gravatar
    Thanks for uploading.
  27. Gravatar
    just gave this link to my brother who know bro.. java is so confusing...i did google search for python..i hope this helps him
  28. Gravatar
    Where is First Part Please?? I go through many tutorials but really, my environment is not setting up?? Trying for Win7-64 bit..
    Please HelP!
  29. Gravatar
    Google app store has tightened their lock on android apps. It is increasingly more difficult to do anything on android without Google making money from it and penetrating whatever little privacy you have. I have a number of viable project candidates for apps using python on android, but I believe Google has gone too far. The type of applications are niche applications and for good reasons are legally not permitted in Holland because of the way Google evades privacy protecting measures. My tablets are mine and mine only and nowhere have i given Google the right to violate my privacy . Nor was I informed in advance that any new functionality I might add was automatically de facto free for Google to do with whatever they like. If I was told it was a closed system, I would never have bought one. I now have a number of android tablets for prototyping, that are otherwise useless for my purposes. The system was advertised as 'open'. It was not advertised as 'you are free to volunteer for the Google business model as long as you surrender your privacy and that of al your future customers. Google lock up of Android stinks !!!
  30. Gravatar
    What package are you downloading to create the app? This is not clear!!
  31. Gravatar
    Android is ruling the universe of smartphones. free Android apps can have a big impact on monitoring your finances. Basically, any tool can have a positive impact on your finances and teaching you how to make the most out of your financial resources.
  32. Gravatar
    Hey all,
    I am glad to know more about this great website.. It is increasingly more difficult to do anything on android without Google making money from it and penetrating whatever little privacy you have. I have a number of viable project candidates for apps using python on android, but I believe Google has gone too far.Thanks for sharing all that great information..
  33. Gravatar
    You can visit on this website For further details about iPhone games deveopment

New comment

240 minutes (inc Q&A)

Tagged as

opengl mobile gui html porting android
Our Sponsors
Python Experts
SSL Matrix
Wanna sponsor?