Chirpstack-api - parsing gateway-bridge messages

I want to log MAC messages such as JOIN requests in my db, as I understood I can get them from MQTT topic “gateway/{gateway_id}/event/rx” only. So I tried to parse messages with chirpstack-api for python, using UplinkFrame from ‘’ package via ‘ParseFromString()’ method and then I for example can find join attempts in all of the uplinks.

I’m not familiar with protobuf, so can someone give an example how I can parse this messages more effectively, оr maybe there is a better way to get mac commands?