KIVY 2.1.0 Newly released

I’m glad to inform everyone that the Kivy team has successfully released the latest version of Kivy, 2.1.0.

For those that don’t know, Kivy is a cross platform application development framework for python. You can use it to write apps for all the major operating systems right now, both mobile and desktop. Kivy is such a powerful tool and I’ve used it personally for many projects. It’s more mature and more powerful that flutter. It’s just sad that the python community does not use it nor support it like it should.

So this is a call for support. Let’s support the use of Python tools and grow the Kivy community. There’s quite an impressive amount of tutorials on YouTube currently about Kivy and KivyMD. And other than that, the kivy documentation itself is highly comprehensive, with instructions ranging from beginner to advanced use cases.

Try out the shinny new kivy now, and I’m sure you’ll love it’s ease and simplicity. KivyMD 1.0.0 is also in the pipeline and it’s bringing so many interesting stuff on the shelf. For more detail, check out this link.

Hi,

In these two example classes:

Properties — Kivy 2.2.1 documentation

Kivy introduces a new way of declaring properties within a class. Before:

class MyClass(object):
    def __init__(self):
        super(MyClass, self).__init__()
        self.numeric_var = 1

After, using Kivy’s properties:

class MyClass(EventDispatcher):
    numeric_var = NumericProperty(1)

Isn’t the numeric_var an instance variable in the first class
and a class variable in the second class?

Every instance has its own instance variable. All instances share the
same class variable.
So the numeric_var in above two examples are different.
They are not the same, are they?

9. Classes — Python 3.12.1 documentation

Kivy uses a declarative “traits” system that relies on metaclasses and the descriptor protocol to change the behavior from what you are expecting. The idea is to be able to declaratively describe the types of fields that class instances can have, on the class definition.

NumericProperty is shared by all instances, but it is a descriptor which more or less is has absolute control over how attribute access is handled for instances. These descriptors can be used to add on additional features like automatic runtime type checking and validation, documentation generation, cross-runtime serialization, even auto-gui creation (different tools focus on different features).

There is actually a long history of these kinds of systems available in Python. Off the top of my head:

And more recently, Python’s own built-in dataclasses.