I would have to look into a bit but using something like: https://pypi.org/project/pyzbar/