How to communicate with /run/snapd.socket using Python?

I found the problem!

The typelib files are stored in $SNAP/usr/lib/x86_64-linux-gnu/girepository-1.0, so, following the advice found in this topic, I added GI_TYPELIB_PATH to my snap’s environment:

apps:
  qabro:
    command: qabro
    environment:
      GI_TYPELIB_PATH: $SNAP/usr/lib/x86_64-linux-gnu/girepository-1.0
      ...

and now it runs fine!