Resources
Tutorials & Books
- Learn Python – Free Interactive Python Tutorial
- Tutorial – Learn Python in 10 minutes
- Free Book: Fast Lane to Python: A Quick, Sensible Route to the Joys of Python Coding (PDF)
When to use Python?
What exactly can you do with Python? Here are Python’s 3 main applications.
Who uses Python?
- Top Seven Apps Built With Python
- 8 Top Python App Examples from Top-notch Companies
- 10 Popular Websites Built With Django
Sample Code / Projects
- 7 Innovative Machine Learning GitHub Projects you Should Try Out in Python
- 36 Amazing Python Open Source Projects (v.2019)
- A list of awesome beginners-friendly projects. – GitHub
- 50 Popular Python open-source projects on GitHub in 2018
Tools
- An introduction to Python on Android – Excerpts
If you’re just looking to access some native features of your phone, then you can do this with a library called sl4a – or Python Android Scripting Layer. This will let us do things like showing dialogs, reading sensors and even accessing the camera.
The following line will open up your camera and save a photo:
import sl4a
droid = sl4a.Android()
droid.cameraInteractiveCapturePicture(“/sdcard/qpython.jpg”)
Or how about opening up a web page? We can do this simply by saying:
from android import Android
droid = Android()
droid.webViewShow(“https://www.androidauthority.com”)
Kivy and creating APKs
If you want to go further then you’ll need to use Kivy. Kivy basically blows the doors wide open by letting us create fully functional Android apps with multi-touch, graphics and more. And this is also how you can turn your Python scripts into APKs that you can install directly on your Android device or even distribute via the Play Store.
Sample:
from kivy.app import App
from kivy.uix.button import Button
class HelloWorld(App):
def build(self):
btn = Button(text='Hello World')
return btn
HelloWorld().run()
You can develop through Kivy on Windows but if you want to create APKs then I recommend using Linux instead. The problem is that creating APKs from Python scripts is still a long-winded and complex process on Windows and involves installing multiple libraries, the Android NDK, setting paths etc. It is complicated to the point of being nigh impossible. Fortunately, a tool exists that can handle all of the heavy lifting for you which is called ‘Buildozer’.
Tips and Tutorials
- Learn Python through the Master Guide – Python Notes for Beginner to Advanced Learners
- Multiprocessing vs. Threading in Python: What Every Data Scientist Needs to Know
- Python offers two libraries –
multiprocessing
andthreading
– for the eponymous parallelization methods
- Python offers two libraries –
- 30 Helpful Python Snippets That You Can Learn in 30 Seconds or Less
Learning / Exploring Daily: My initial 2o days streak
- Day 20: Exploring Python for Data Analysis – The Numpy Library – Part 2 (Sunday, September 1, 2019)
- Day 19: Exploring Python for Data Analysis – The Numpy Library (Saturday, August 31, 2019)
- Day 18: Exploring Python for Data Analysis (Friday, August 30, 2019)
- Day 17: Explore Machine Learning with Python-2 (Thursday, August 29, 2019)
- Day 16: Exploring Machine Learning with Python (Wednesday, August 28, 2019)
- Day 15: Python – Notes on Webscraping (Tuesday, August 27, 2019)
- Day 14 Exploring Python – Flask vs Django (Monday, August 26, 2019)
- Day 13: Exploring Python – Creating Games (Sunday, August 25, 2019)
- Day 12: Exploring Python with Django – Under The Hood (Saturday, August 24, 2019)
- Day 11: Exploring Python with Django – Tips (Friday, August 23, 2019)
- Day 10: Exploring Python with Django (Thursday, August 22, 2019)
- Day 9: Exploring Python with Projects (Wednesday, August 21, 2019)
- Day 8: Exploring Python with Projects (Tuesday, August 20, 2019)
- Day 7: Exploring Python with Projects (Monday, August 19, 2019)
- Day 6: Exploring Python with Projects (Sunday, August 18, 2019)
- Day 5: Exploring Python with Projects (Saturday, August 17, 2019)
- Day 4: Exploring Python with Projects (Friday, August 16, 2019)
- Day 3: How To Begin With Python (Thursday, August 15, 2019)
- How To Begin With Python: Day 2 (Wednesday, August 14, 2019)
- How To Begin With Python: Day 1 (Tuesday, August 13, 2019)