Kivy is an open-source Python framework used to create a cross-platform GUI (graphical user interface) apps.
Why should you choose Kivy?
Kivy has lots of different options, despite this, it is relatively simple.
If you want to create an app with GUI in Python, this is most likely the easiest option.
What can you create using Kivy?
As I mentioned above, Kivy is a Python framework used to create GUI apps for several platforms such as Windows, Linux, MacOS or Android.
Kivy is perfect for everything except 3D games. You can create animations, buttons, text inputs, images, but not 3D objects (it is possible, but Kivy wasn't developed for it).
You can see their page (https://kivy.org/gallery.html) where are some of the most popular applications which run on Kivy.
What do you need?
The only thing you need to start developing Kivy apps is to know a little bit of Python. You need to know what are classes, objects etc. and you have to be able to work with them.
Then, you need a PC or mobile phone. If you use Windows, I recommend VS Code. If you use phone (Android), Pydroid 3 is the best app which you can find on Play Store.
What are .kv files and how to work with them?
.kv file is a type of file which contains a code written in Kivy language. It can look like this:
#:kivy 1.10.1
#: import math math
<Label>:
size: 700, 80
font_size: 70
color: (0.5, 0.7, 0.3, 1)
<MainAppLayout>:
label1:label1
Label:
id: label1
text: str(round(math.pi, 8))
pos: root.width - self.width, root.top - self.height
The .kv file is usually used to divide the graphical part of code from the .py code. The .py code contains an instruction which tells it to open and read the .kv file. The instruction looks like:
class MainAppLayout(BoxLayout):
pass
class MainApp(App):
def build(self):
Builder.load_file("YourApp.kv")
return MainAppLayout()
app = MainApp()
app.run()
How to create .kv file?
You can create .kv file simply in your code editor by renaming your file which contains the Kivy code.
Later, I'll post some fundamental objects from Kivy, like Buttons, Labels, TextInputs etc.
I'll also create some posts with more sofisticated issues like setting light and dark mode, creating more complicated Buttons, animations....
I hope you enjoyed this post.
And don't create scams with cryptocurrencies. It isn't good for environment.
You can support my work there (TRC-20):
TRTrony1AmK3233VXTENcXSFem7sLRu2am
Or there (ERC-20):
0x026678e4c9586d207bd7e3907378cc28e8608a1c
Thanks for any support!