Python wrapper for ZXing Java library
Project description
pyzxing
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_barcode
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyzxing-0.3.2.tar.gz
.
File metadata
- Download URL: pyzxing-0.3.2.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d10f3ac5444199c4c5b64daede1e8f4a5a3b5ac472197c0fa8e19baf2dd8017 |
|
MD5 | 5fe3e9eec5cd928f3ef7d724c46af308 |
|
BLAKE2b-256 | 3e2f430f5da4fe68979af595e4b015bf391aa5d1d5a1f1efc4e7759f49ead9b9 |
File details
Details for the file pyzxing-0.3.2-py3-none-any.whl
.
File metadata
- Download URL: pyzxing-0.3.2-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb103612571f0a12956859803b4aec716bdf62885e0353f300ba653257daefec |
|
MD5 | 92dca2436003aa5a37617c50ce9d60c0 |
|
BLAKE2b-256 | 32305b98ef24dbb9b68b475893755426cbe2113c9916cac755a5c05ef671d79a |