Barcode and QR code scanning SDK for Python
Project description
Python Extension: Barcode and QR Code SDK
The project uses CPython to bind Dynamsoft C/C++ Barcode Reader SDK. It aims to help developers build Python barcode and QR code scanning apps on Windows, Linux, macOS, Raspberry Pi and Jetson Nano. You are free to customize the Python API for Dynamsoft Barcode Reader.
Dynamsoft Barcode Reader Version
v9.0.0
License Key for SDK
Click here to get a 30-day FREE trial license.
Supported Barcode Symbologies
-
Linear Barcodes (1D)
- Code 39 (including Code 39 Extended)
- Code 93
- Code 128
- Codabar
- Interleaved 2 of 5
- EAN-8
- EAN-13
- UPC-A
- UPC-E
- Industrial 2 of 5
-
2D Barcodes:
- QR Code (including Micro QR Code)
- Data Matrix
- PDF417 (including Micro PDF417)
- Aztec Code
- MaxiCode (mode 2-5)
-
Patch Code
-
GS1 Composite Code
Supported Python Edition
- Python 3.x
Requirements
How to Build the Python Barcode and QR Code Extension
-
Create a source distribution:
python setup.py sdist
-
distutils:
python setup_distutils.py build
-
scikit-build:
python setup.py develop pip wheel . --verbose
Quick Start
-
Console App
import barcodeQrSDK # set license barcodeQrSDK.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAxLTE2NDk4Mjk3OTI2MzUiLCJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSIsInNlc3Npb25QYXNzd29yZCI6IndTcGR6Vm05WDJrcEQ5YUoifQ==") reader = barcodeQrSDK.DynamsoftBarcodeReader() results = reader.decodeFile("test.png") for result in results: print(result.format) print(result.text) print(result.x1) print(result.y1) print(result.x2) print(result.y2) print(result.x3) print(result.y3) print(result.x4) print(result.y4)
-
Video App
import cv2 import barcodeQrSDK import time import numpy as np # set license barcodeQrSDK.initLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAxLTE2NDk4Mjk3OTI2MzUiLCJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSIsInNlc3Npb25QYXNzd29yZCI6IndTcGR6Vm05WDJrcEQ5YUoifQ==") # initialize barcode reader reader = barcodeQrSDK.DynamsoftBarcodeReader() def get_time(): localtime = time.localtime() capturetime = time.strftime("%Y%m%d%H%M%S", localtime) return capturetime def read_barcode(): vc = cv2.VideoCapture(0) if vc.isOpened(): # try to get the first frame rval, frame = vc.read() else: return windowName = "Barcode Reader" while True: cv2.imshow(windowName, frame) rval, frame = vc.read() results = reader.decodeMat(frame) if (len(results) > 0): print(get_time()) print("Total count: " + str(len(results))) for result in results: print("Type: " + result.format) print("Value: " + result.text + "\n") x1 = result.x1 y1 = result.y1 x2 = result.x2 y2 = result.y2 x3 = result.x3 y3 = result.y3 x4 = result.x4 y4 = result.y4 cv2.drawContours(frame, [np.array([(x1, y1), (x2, y2), (x3, y3), (x4, y4)])], 0, (0, 255, 0), 2) # 'ESC' for quit key = cv2.waitKey(20) if key == 27: break cv2.destroyWindow(windowName) if __name__ == "__main__": print("OpenCV version: " + cv2.__version__) read_barcode()
Online Documentation
To customize Python API based on C/C++, please refer to the online documentation.
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 Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file barcode-qr-code-sdk-9.0.3.tar.gz.
File metadata
- Download URL: barcode-qr-code-sdk-9.0.3.tar.gz
- Upload date:
- Size: 47.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bf067c9f9c41e7267fdea4744f5fdb8106382f1f70d26c45cbc523cab89ced5
|
|
| MD5 |
8c7c173caf336f7df50d07841b1c055f
|
|
| BLAKE2b-256 |
e0e066e9bb8c21e3970991982efb0e873212a48e5e152208cd3aa9b87ed2ca9b
|
File details
Details for the file barcode_qr_code_sdk-9.0.3-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: barcode_qr_code_sdk-9.0.3-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 9.5 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6fac22c8665f2f14ecd43bc46270d6ca6763a9265ad31bdeebe71fa889daed3
|
|
| MD5 |
23e06a85ec858df71dc38513890d8533
|
|
| BLAKE2b-256 |
337241f7b5158bdbe7a40bb168eb09334c6f95e1676bea496539220240d9edaa
|
File details
Details for the file barcode_qr_code_sdk-9.0.3-cp310-cp310-macosx_10_13_x86_64.whl.
File metadata
- Download URL: barcode_qr_code_sdk-9.0.3-cp310-cp310-macosx_10_13_x86_64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.10, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c550dc73385c309d4deb26809451bed31e0c8aeb10976c420a58cf6dc77b3740
|
|
| MD5 |
04547295c6c09c3122d3df3d08294d39
|
|
| BLAKE2b-256 |
798eaf463652fce005db63bc88ba232c0cb274c1b112328bb8d696ba8e6efa2e
|
File details
Details for the file barcode_qr_code_sdk-9.0.3-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: barcode_qr_code_sdk-9.0.3-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 9.5 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67eb06a846927d62f96309059b6d47f9de7923316c8bdc90fbd8cb1b83b86cbe
|
|
| MD5 |
2bf18646d4244049180adde31ad71b6a
|
|
| BLAKE2b-256 |
b639067f43d545c6c8b4f5d8a823fd30f5076dacab80eebdf45984a7609db688
|
File details
Details for the file barcode_qr_code_sdk-9.0.3-cp39-cp39-macosx_10_13_x86_64.whl.
File metadata
- Download URL: barcode_qr_code_sdk-9.0.3-cp39-cp39-macosx_10_13_x86_64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.9, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c3801a252128ab80947b1538af64147a6b45019ca1fd434a8187124d21f2190
|
|
| MD5 |
45113c1c4f5caf0b1f981c8f9c844e51
|
|
| BLAKE2b-256 |
d562e7a38d29daf9f0fbc7f364adf047efa603cef398a121c1bc7193027ef937
|
File details
Details for the file barcode_qr_code_sdk-9.0.3-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: barcode_qr_code_sdk-9.0.3-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 9.5 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99638802730eceb5326e285dcd32fd0aa865835069bd34dde6e3fe28d026ebf9
|
|
| MD5 |
782f331741cf7ce1cbe2806d4eee3056
|
|
| BLAKE2b-256 |
9f2d952211e83d2d7f926382405974d589b4e28018d66df354ed247b6da436aa
|
File details
Details for the file barcode_qr_code_sdk-9.0.3-cp38-cp38-macosx_10_13_x86_64.whl.
File metadata
- Download URL: barcode_qr_code_sdk-9.0.3-cp38-cp38-macosx_10_13_x86_64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.8, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c0a74e00f33b4a5f16cc8d6d8cfb1b4f638268032d5ec06f03288449ced2c89
|
|
| MD5 |
ddbca8facbcb19d8dcbdcc710504a8e1
|
|
| BLAKE2b-256 |
1f425937321eec08a4a499e31842d6ada62fdbcead676b07401d82d8c1104372
|
File details
Details for the file barcode_qr_code_sdk-9.0.3-cp37-cp37m-win_amd64.whl.
File metadata
- Download URL: barcode_qr_code_sdk-9.0.3-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 9.5 MB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ddd6f714ed87b636b2e725edd7a7feb96e2652a3ba58a65b817032c52535544
|
|
| MD5 |
dd39ce9c66de672ab6e75484ba4102a8
|
|
| BLAKE2b-256 |
0bf3dab56150de69827ec76250bf973b568119c70febbc975600def9944c191b
|
File details
Details for the file barcode_qr_code_sdk-9.0.3-cp37-cp37m-macosx_10_13_x86_64.whl.
File metadata
- Download URL: barcode_qr_code_sdk-9.0.3-cp37-cp37m-macosx_10_13_x86_64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.7m, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80be9ef280fa26cc88b21e078cc90f285aa1fc441503f81b29fc295c629885e0
|
|
| MD5 |
97f93bf8b03d08fe5c0253c6b4159a26
|
|
| BLAKE2b-256 |
6a805b07e112b07169c9b503d2b9c10da47e0c0c907ed609db90cd48720771fe
|
File details
Details for the file barcode_qr_code_sdk-9.0.3-cp36-cp36m-win_amd64.whl.
File metadata
- Download URL: barcode_qr_code_sdk-9.0.3-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 9.5 MB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1732aa4baaa234b511c29f7d616188621170f81ea37b301dcb30113a293eef06
|
|
| MD5 |
8617df40df8789716d5b8fbb37bfaece
|
|
| BLAKE2b-256 |
7a644593770de779a3a42a993a560d560f5968327a8fa55d78b7c71e60275ad9
|
File details
Details for the file barcode_qr_code_sdk-9.0.3-cp36-cp36m-macosx_10_13_x86_64.whl.
File metadata
- Download URL: barcode_qr_code_sdk-9.0.3-cp36-cp36m-macosx_10_13_x86_64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.6m, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f053cfeaa1d5d974de60d39591f50302c45cb1504d53c6a300cc5c5e8650012c
|
|
| MD5 |
7eced786c0cbd51bf88c09d5225c1a8a
|
|
| BLAKE2b-256 |
f1b89471acb1db7ec26c4e79efd0e73b67b81a38e8c25b8b6156b8959a29b85a
|