I'm building a mobile app using kivy and python, and I want to understand what parts in my code I could explain to someone else being my frontend and backend part. I have one kv file plus one py file where my code is. My question is now, is all the code I'm having in the kv file, for example a button with a text and an on_press function, my frontend? Can I call my entire py file for a backend file, even though it sometimes does such simple functions as changing a text on a button in my kv code?
I would say that all the code dealing with manipulating the gui is the frontend, and all the code that deals with other state is the backend. In general it is good architecture to separate these, but it's possible to mix in what could/should be backend state so that it's strongly coupled to the gui, in which case there might not be a clear separation to point to.
I don't think it's useful to present the .py/.kv disinction into the definition of frontend vs backend - it's tempting since on the surface it's sort of right, but it doesn't really hold up to scrutiny. As you note, the .kv file isn't really different to parts of the .py file that directly manipulate the gui.
What parts in my Kivy application corresponds to the backend and their frontend