Skip to main content

Real time Barcode and QR Code scanner Edit

Project description

zbarcam

Build Status Coverage Status PyPI version Documentation Status

Real time Barcode and QR Code scanner using the camera. It's built on top of Kivy and pyzbar.

screenshot

How to use

Simply import and instanciate ZBarCam in your kvlang file and access its symbols property.

#:import ZBarCam kivy_garden.zbarcam.ZBarCam
#:import ZBarSymbol pyzbar.pyzbar.ZBarSymbol
BoxLayout:
    orientation: 'vertical'
    ZBarCam:
        id: zbarcam
        # optional, by default checks all types
        code_types: ZBarSymbol.QRCODE, ZBarSymbol.EAN13
    Label:
        size_hint: None, None
        size: self.texture_size[0], 50
        text: ', '.join([str(symbol.data) for symbol in zbarcam.symbols])

A full working demo is available in src/main.py.

Install

Ubuntu

Install system requirements (Ubuntu 18.04):

make system_dependencies

Install zbarcam:

pip install zbarcam

Then import it in your Python code via:

from kivy_garden.zbarcam import ZBarCam

Android

Build for Android via buildozer, see buildozer.spec.

Contribute

To play with the project, install system dependencies and Python requirements using the Makefile.

make

Then verify everything is OK by running tests.

make test
make uitest

Troubleshooting

Android ValueError: Empty module name

More likely an import issue in your .kv file. Try to from zbarcam import ZBarCam in your main.py to see the exact error. It's common to forget Pillow in buildozer.spec requirements section.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zbarcam-2019.1020.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

zbarcam-2019.1020-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file zbarcam-2019.1020.tar.gz.

File metadata

  • Download URL: zbarcam-2019.1020.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for zbarcam-2019.1020.tar.gz
Algorithm Hash digest
SHA256 8f6431c691381820b223b3beeb477b45c108a87ae68c9bd44010eb548c646807
MD5 500a34bea20d3e2ce3096e3b508a760d
BLAKE2b-256 c5a6df7ba703a501970c69cb73ad65bb45d9067b3a273fb366261b3d080d8c64

See more details on using hashes here.

File details

Details for the file zbarcam-2019.1020-py3-none-any.whl.

File metadata

  • Download URL: zbarcam-2019.1020-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for zbarcam-2019.1020-py3-none-any.whl
Algorithm Hash digest
SHA256 eee784b004b98c14a2f5004baa610d2b8d44413de068aaa54ea3e09bf49e11f0
MD5 e3c654bc958627f1bd3024fa612e8d68
BLAKE2b-256 476ef786576e5d162fa15ca471f38bd7b47baf4f5b873f6b32899fd01e8db203

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page