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
-
setuptools:
python setup_setuptools.py build python setup_setuptools.py develop # Copy libraries to barcodeQrSDK folder
-
scikit-build:
python setup.py build python setup.py develop # Copy libraries to barcodeQrSDK folder
-
Build wheel:
pip wheel . --verbose # Or python setup_setuptools.py bdist_wheel # Or python setup.py bdist_wheel
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
barcode-qr-code-sdk-9.0.4.tar.gz
(47.3 MB
view hashes)
Built Distributions
Close
Hashes for barcode-qr-code-sdk-9.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 645e5559b8acaf205112293afb7ec9ab7a0ccf041e3975e162a1bfeb7d50d6a8 |
|
MD5 | 5f12782f3f464c3ef31fb93a0c3ca6f9 |
|
BLAKE2b-256 | c6a8b62e191c24a484ac62d8b606cf24623c58169d97957951bd83c97592cd8b |
Close
Hashes for barcode_qr_code_sdk-9.0.4-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03a4bc93af6e3b684a4e0b922a557bb2295b0666b3034d3393264b6e99ce0613 |
|
MD5 | e3876b6bb1950677512a3d7a7f8853d6 |
|
BLAKE2b-256 | dfd33760e935f9093f6fc49579dafb97cb8a7fdf7e703b3c88a66ab6e1773b07 |
Close
Hashes for barcode_qr_code_sdk-9.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30f48454e9a37bb2714507a58b9ff3bf604d7d6fdc6018de9ba0b155407891f4 |
|
MD5 | 0d7bf1625afa9c2eccda2c5843aa6209 |
|
BLAKE2b-256 | 0a6fc84400fe8f64bca6787604b1d0acf84d2e40874074f7cc2431cb67e5f394 |
Close
Hashes for barcode_qr_code_sdk-9.0.4-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dc8c395629bc12cfb6856629e561141709201f4e7a6298efb3a33c7077bca4f |
|
MD5 | c0089acc7394c661cd0822d839094b24 |
|
BLAKE2b-256 | 0b53894d3367a2e3b18fba64ee0425e44249cf805941dc1c35599ae0024cfdad |
Close
Hashes for barcode_qr_code_sdk-9.0.4-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f69126808faeb8491facee4e5dc36152eddd81232e6020020f827b7ecf7d98a9 |
|
MD5 | 722bdf197ac49b9542b4237c1e1eca4d |
|
BLAKE2b-256 | 991ac85ef79dd8db4a9a34ffa3b6fbfe92d231253aff35eeeab3a556b4db9246 |
Close
Hashes for barcode_qr_code_sdk-9.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b3865bb89d7766c196ac4935d4bf3ab78f1f4dacd2e8589acd6288602068fd6 |
|
MD5 | 9b96253ea564c20449cd2c80b2f421db |
|
BLAKE2b-256 | 999671cadc8741160e956c3aad52a5997f455405e96c175e3d7ea3fe06233174 |
Close
Hashes for barcode_qr_code_sdk-9.0.4-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04801c48006b7ec774d2d156bd4d0663b0651889a6a3d551bdaeaaa839a73197 |
|
MD5 | 15601649f6d53dcf2178cfa7a123f199 |
|
BLAKE2b-256 | ec3ca65852076bd5cc1c877611b9c7a42aa11349a8e936287badda454ce9be5b |
Close
Hashes for barcode_qr_code_sdk-9.0.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9b9e7a1afcce211b15bbd917b2f0a94be1e5a6edbd6d419ddfeae8c09ef5b7e |
|
MD5 | 9d3aac1835976159add593089c2275fd |
|
BLAKE2b-256 | 10a1dfe21ca32bbdc55fb3961433ac3644cbf94996ee55a4e9d2e7ecf49cdcf3 |
Close
Hashes for barcode_qr_code_sdk-9.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8734d9a12df1def3ab01a3302440f84bfc600fcec45c0fe4895d5318a9636d8c |
|
MD5 | 65f9e528700faa2bd6e86c6155e2e3e1 |
|
BLAKE2b-256 | fa38741e98f75939a1bdf99d1b7837e1fe67d2ffbeafa9d29e88db8c2c2c0707 |
Close
Hashes for barcode_qr_code_sdk-9.0.4-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bc3a05ba88b6f2380d223bed351984d3e510865612282aa76e0e285239598d5 |
|
MD5 | c0294987074795f451bc523a1de4d07f |
|
BLAKE2b-256 | 9428d56c8e3e4700511c366d4992875c18db1334c58cbc0fbd523c34d8fc8b68 |
Close
Hashes for barcode_qr_code_sdk-9.0.4-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 455ff31a86d4c002d798424b71d7b161131b3626b7c2ef28d264bb78c9407539 |
|
MD5 | 9702981f80e8e6426dd1c8695cf46802 |
|
BLAKE2b-256 | e2dc994fee8487b063840562bbdd7bd32532708f6d31cfc3623e8e64ab0836a2 |
Close
Hashes for barcode_qr_code_sdk-9.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03665d1599bac743a352e4837c074d6662df1b6b399f65329b07cb2ee0f4ccd7 |
|
MD5 | cba9ef158e0e39122dac08954ba7a33d |
|
BLAKE2b-256 | b4f8290e6e69733349981167d6d0b9249f5d455eee8003378d21683cd0587fe4 |
Close
Hashes for barcode_qr_code_sdk-9.0.4-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e76d6540f3850fe49c832b637ed550c30085fa89ab1eec4e92b7343de22f3e7e |
|
MD5 | 23c309d66b854005f16d349b2544abc4 |
|
BLAKE2b-256 | 60f956f915c824ea00faa674f94a5a18432a0e86891751a04617e85822c144bd |
Close
Hashes for barcode_qr_code_sdk-9.0.4-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6107812a1d5e54c527e9b49a9d4fdad6006dd98c15dd2f8ceaf308840ef2ac1d |
|
MD5 | 4778e3d3e6cf634a985e6fc35f596c3c |
|
BLAKE2b-256 | 2434e0a5df27a4ee1a12b16256780822d02a2d365f4fdc61248d73dd447e11f7 |
Close
Hashes for barcode_qr_code_sdk-9.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a5cec2f221c30ab2e202a1938cf7d5a31ecd607f530532e6551a11f55caabdb |
|
MD5 | ec68de911a68219da56d302c61a35e77 |
|
BLAKE2b-256 | 0e613d12481ad471e6327871f283b37cf2fe5fab0f616b802f41c42f455e3374 |
Close
Hashes for barcode_qr_code_sdk-9.0.4-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a79fa1609aa5444edd3abf9ccdaeab78d0051dd3a61829048e2aca01e8b7a210 |
|
MD5 | 163559137b623890bc0072c7946953f1 |
|
BLAKE2b-256 | 1d08bb22c192a4229f09d570cf7fc111bd3c092b0e1d1b478a419bd5438c3034 |