Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
June 1, 2020 10:14 am GMT

Wow can python do that?

Hey everyone, I wanted to start a new series in dev.to with name can python do that.

This series aims to cover python libraries which are amazing and beginner friendly. As a part of this series I will include 3 libraries every week. If this seems less in number please feel free to comment the frequency of the articles to be posted. I would love to catch up with the speed.

Ready

TLDR;
Libraries we will be glancing today are

  • Kivy
  • Toga
  • Dash

For all those JS fans out there you know you can develop application in Javascript for Mobile (iOS and Android), Desktop(macOS, Linux and Windows) using technologies like Electron, React Native.
Spoiler Alert: React Native for macOS and Windows. Microsoft blog post

Would you be amazed if I say we can do same native application development using Python
Mind Blown Gif

Kivy

Kivy Logo

Kivy - Open source Python library for rapid development of applications that make use of innovative user interfaces, such as multi-touch apps.

PYPI
Docs

There is an application which was used in Pycon India 2018 which is built entirely on Kivy.

GitHub logo pythonindia / PyCon-Mobile-App

PyCon India App developed with Kivy

PyCon India 2018 Application

Mobile App for PyConIndia

Requirements:

Kivy Installation:

Dependencies-

Install from pip

  • pip install -r requirements.txt

WIP

To test install kivy and run the following::

$ python eventsapp/main.py -m screen:droid2,portrait -m inspector$ python3 eventsapp/main.py -m screen:droid2,portrait -m inspector

Help on screens

To change images in app

  • Paste/change the image in PyCon-Mobile-App/tools/theming
  • Change your directory to PyCon-Mobile-App
  • Run command make theming

This command will aggregate all the png images in your file to one atlasfrom which the images are loaded.

to make apk prefer linux

  1. Install buildozer: pip install buildozer
  2. Edit the buildozer.spec to specify if you have android ndk and sdkif not they will be automatically be downloaded by the next step.
  3. Connect your mobile, enable usb debugging, Then goto PyConIndiafolder and type make apk

Link to a existing vm that can be re-used will be added for convenience.

to make

Toga

Toga Logo
Toga uses native system widgets, not themes. When you see a Toga app running, it doesnt just look like a native app - it is a native app. Applying an operating system-inspired theme over the top of a generic widget set is an easy way for a developer to achieve a cross-platform goal, but it leaves the end user with the mess.

Fun Fact
So, why is it called "Toga"?
When in Rome, do as the Romans do. And what does a Roman wear? A Toga!

PYPI
Docs

Dash

Dash Logo
Dash is a Python framework for building analytical web applications. No JavaScript required.Built on top of Plotly.js, React and Flask, Dash ties modern UI elements like dropdowns, sliders, and graphs directly to the python code.
The Dash platform empowers Data Science teams to focus on the data and models, while producing and sharing enterprise-ready analytic apps that sit on top of Python and R models. What would typically require a team of back-end developers, front-end developers, and IT can all be done with Dash.

PYPI
Docs

Follow me so that you won't miss new posts under this series.

.ltag__user__id__317018 .follow-action-button { background-color: #2e0338 !important; color: #ffffff !important; border-color: #2e0338 !important; }
gillarohith image

Thanks

Spoiler Alert: Next week we will see a framework with which building data apps would be like eating a pie

Peace ,
Rohith Gilla


Original Link: https://dev.to/gillarohith/wow-can-python-do-that-53ih

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To