I'm trying to find a way to utilize my phone's camera as a barcode scanner using Python. Essentially, I want to scan a barcode, read it, and then call an API to fetch data from a database. I've attempted various libraries with no success so far, but I'm open to suggestions on what to try next!
4 Answers
Have you looked into Toga? It has an API to access the camera, and there are various libraries that can detect barcodes and QR codes from images. Definitely worth checking out!
It could help if you listed the libraries you’ve already tried and what issues you encountered. That way, folks can offer more relevant advice!
You might want to try Plyer; I haven’t used it for barcode scanning but it works pretty well for other purposes on desktop.
If you want to skip using your phone, have you considered USB cameras or dedicated barcode scanners that connect via USB? For a phone solution, building a mobile app might be your best bet.
I'm aiming for something that mimics a quick self-checkout style, which is why I'm leaning towards using the phone.
Good point! I'll put together a list of what I've tried to make it easier for everyone.