This is the python component from a first-year mini-project at QUT in IFB102 (2018).
The python script has been adapted from Adrian Rosebrock's tutorial at: https://www.pyimagesearch.com/2018/05/21/an-opencv-barcode-and-qr-code-scanner-with-zbar/
The two main libraries used are:
-OpenCV (for the computer vision competent)
-PyZbar (the Python flavour of Zbar - for reading barcodes)
Note that the 5MP Raspberry Pi Camera used has no auto-focus, so QR codes read fine, however, for ordinary bar codes this was not so.