Skip to main content

Python wrapper for ZXing Java library

Project description

pyzxing

English | 简体中文

Travis (.org) GitHub release (latest by date including pre-releases) PyPI Codacy grade

A Python wrapper of ZXing library. python-zxing does not work properly and is out of maintenance. So I decide to create this repository so that Pythoneers can take advantage of ZXing library with minimum effort.

Features

  • Super easy to get hands on ZXing with Python
  • Structured outputs
  • Scan multiple barcodes in one picture
  • Scan multiple pictures in parallel, which speeds up 77%

Installation

Installing from Github source is recommended :

git clone https://github.com/ChenjieXu/pyzxing.git
cd pyzxing
python setup.py install

It is also possible to install from PyPI:

pip install pyzxing

Build ZXing Library

A ready-to-go jar file is available with release, but I can not guarantee that this file will work properly on your PC. You may run test script before building ZXing. Pyzxing will download compiled Jar file automatically and call unit test. For those who haven't installed Java, I strongly recommend you to install openjdk8.

python -m unittest src.test_decode

If failed, build ZXing using following commands.

git submodule init
git submodule update
cd zxing
mvn install -DskipTests
cd javase
mvn -DskipTests package assembly:single

Quick Start

from pyzxing import BarCodeReader
reader = BarCodeReader()
results = reader.decode('/PATH/TO/FILE')
# Or file pattern for multiple files
results = reader.decode('/PATH/TO/FILES/*.png')
print(results)

Or you may simply call it from command line

python scanner.py -f /PATH/TO/FILE

GUI of pyzxing, pyzxing-GUI, is available now!

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

pyzxing-0.3.4.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

pyzxing-0.3.4-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file pyzxing-0.3.4.tar.gz.

File metadata

  • Download URL: pyzxing-0.3.4.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1

File hashes

Hashes for pyzxing-0.3.4.tar.gz
Algorithm Hash digest
SHA256 a1b151107da4d8dbb5fc93060c930cd07088f9dde53b71a603779c25ad20e4e9
MD5 db7ece0118738d8b20a5bc09bc4ff6f8
BLAKE2b-256 b61279fcb7208154a85801f7a54f2ae99cc890496ce0ab6ad76d125b8e6add40

See more details on using hashes here.

File details

Details for the file pyzxing-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: pyzxing-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.1

File hashes

Hashes for pyzxing-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3df318826eb5fb8f355516947a7a7707f3214be039831d07122e829500693418
MD5 9447f4ed3eda1b23897e825c349ce033
BLAKE2b-256 17eca2a5cbc6b20e92b3ba8f644939aed1385b61b78801b05326d3f732e5c765

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