The links I sent in the first reply were examples of custom functions and classes that I use in qtile. The my entire qtile config (ie. all the python files needed for my configuration) can be found here:
https://github.com/jrwrigh/dotfiles2.0/tree/T14/.config/qtileWhen "hacking" in python, two built-in commands will be your friends: 'dir' and 'type'. 'type' tells you what type of object you're dealing with. 'dir' lists all the attributes of a object.
I also highly recommend bypassing qtile's command client for figuring out how everything works under the hood and instead use 'aiomanhole`. This gives you
direct access to the qtile process's Python interpreter, which allows you to run 'dir' and 'type' commands on the base 'qtile' object itself (which is the argument to lazy functions). I find that the command client generally doesn't help when writing functions (possibly something I misunderstand about how it works).
If you go down the 'aiomanhole' route, note that running "exit" while in that remote session will "exit" the Python process itself, which kills qtile and will kick you back to the login screen. Instead, you just have to Ctrl+C or close the terminal to get out without killing qtile.
Lastly, your english is actually quite good. Much better than me speaking any other language. haha