Skip to content

Commit baba6cb

Browse files
Merge pull request #40 from Dynamsoft/dev
Dev
2 parents 9e79ddc + 8821ffd commit baba6cb

12 files changed

+38
-70
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ License Notice
22

33
This folder contains code samples ("Sample Code") for use with Dynamsoft Barcode Reader, a commercial software development kit licensed by Dynamsoft. The Sample Code may be modified and included in your end user software under the terms of the Dynamsoft Software License Agreement   https://www.dynamsoft.com/barcode-reader/license-agreement/ (“Commercial License”). Except as expressly stated in the Commercial License, no other rights are granted in the Sample Code. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44

5-
Copyright © 2003–2021 Dynamsoft. All rights reserved.
5+
Copyright © 2003–2022 Dynamsoft. All rights reserved.

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Dynamsoft Barcode Reader samples for Python edition
22

33
[![Current version number](https://img.shields.io/pypi/v/dbr?color=orange)](https://pypi.org/project/dbr/)
4-
[![Supported Python versions](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-blue)](https://www.python.org/downloads/)
4+
[![Supported Python versions](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue)](https://www.python.org/downloads/)
55
[![PyPI downloads](https://img.shields.io/pypi/dm/dbr)](https://pypistats.org/packages/dbr)
66

77
![Dynamsoft](https://dynamsoft.github.io/styleguide/assets/images/icons/dynamsoft_logos/dynamsoft_logo_original.png "Dynamsoft")
@@ -23,6 +23,7 @@ This repository contains multiple samples that demonstrates how to use the [Dyna
2323
- Python3.7
2424
- Python3.8
2525
- Python3.9
26+
- Python3.10
2627

2728
## Installation
2829

@@ -49,8 +50,13 @@ https://www.dynamsoft.com/barcode-reader/programming/python/?ver=latest&utm_sour
4950

5051
## License
5152

52-
- If you want to use an offline license, please contact [Dynamsoft Support](https://www.dynamsoft.com/company/contact/)
53-
- You can also request a 30-day trial license in the [customer portal](https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=python)
53+
The library requires a license to work, you use the API init_license to initialize license key and activate the SDK.
54+
55+
These samples use a <a href="https://www.dynamsoft.com/license-server/docs/about/terms.html?ver=latest&product=dbr&utm_source=samples&package=python#public-trial-license" target="_blank">free public trial license</a>. Note that network connection is required for this license to work.
56+
57+
You can also request a 30-day trial license from <a href="https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=python" target="_blank">Customer Portal</a>
58+
59+
For more information, please refer to https://www.dynamsoft.com/license-server/docs/about/licensefaq.html.
5460

5561
## Contact Us
5662

samples/general-settings.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@
44
if __name__ == "__main__":
55
try:
66
# 1.Initialize license.
7-
# The organization id 200001 here will grant you a free public trial license. Note that network connection is required for this license to work.
8-
# If you want to use an offline license, please contact Dynamsoft Support: https://www.dynamsoft.com/company/contact/
7+
# The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
98
# You can also request a 30-day trial license in the customer portal: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=python
10-
para = BarcodeReader.init_dls_connection_parameters()
11-
para.organization_id = "200001"
12-
error = BarcodeReader.init_license_from_dls(para)
9+
error = BarcodeReader.init_license("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9")
1310
if error[0] != EnumErrorCode.DBR_OK:
1411
print("License error: "+ error[1])
1512

samples/hello-world.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@
44
if __name__ == "__main__":
55
try:
66
# 1.Initialize license.
7-
# The organization id 200001 here will grant you a free public trial license. Note that network connection is required for this license to work.
8-
# If you want to use an offline license, please contact Dynamsoft Support: https://www.dynamsoft.com/company/contact/
7+
# The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
98
# You can also request a 30-day trial license in the customer portal: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=python
10-
para = BarcodeReader.init_dls_connection_parameters()
11-
para.organization_id = "200001"
12-
error = BarcodeReader.init_license_from_dls(para)
9+
error = BarcodeReader.init_license("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9")
1310
if error[0] != EnumErrorCode.DBR_OK:
1411
print("License error: "+ error[1])
1512

samples/image-decoding.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,9 @@ def choose_number() -> int:
2525
if __name__ == "__main__":
2626
try:
2727
# 1.Initialize license.
28-
# The organization id 200001 here will grant you a free public trial license. Note that network connection is required for this license to work.
29-
# If you want to use an offline license, please contact Dynamsoft Support: https://www.dynamsoft.com/company/contact/
28+
# The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
3029
# You can also request a 30-day trial license in the customer portal: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=python
31-
para = BarcodeReader.init_dls_connection_parameters()
32-
para.organization_id = "200001"
33-
error = BarcodeReader.init_license_from_dls(para)
30+
error = BarcodeReader.init_license("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9")
3431
if error[0] != EnumErrorCode.DBR_OK:
3532
print("License error: "+ error[1])
3633

samples/performance/accuracy-first-settings.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,9 @@ def output_results(results:TextResult):
4747
if __name__ == "__main__":
4848
try:
4949
# 1.Initialize license.
50-
# The organization id 200001 here will grant you a free public trial license. Note that network connection is required for this license to work.
51-
# If you want to use an offline license, please contact Dynamsoft Support: https://www.dynamsoft.com/company/contact/
50+
# The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
5251
# You can also request a 30-day trial license in the customer portal: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=python
53-
para = BarcodeReader.init_dls_connection_parameters()
54-
para.organization_id = "200001"
55-
error = BarcodeReader.init_license_from_dls(para)
52+
error = BarcodeReader.init_license("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9")
5653
if error[0] != EnumErrorCode.DBR_OK:
5754
print("License error: "+ error[1])
5855

samples/performance/batch-decode.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@
66
if __name__ == "__main__":
77
try:
88
# 1.Initialize license.
9-
# The organization id 200001 here will grant you a free public trial license. Note that network connection is required for this license to work.
10-
# If you want to use an offline license, please contact Dynamsoft Support: https://www.dynamsoft.com/company/contact/
9+
# The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
1110
# You can also request a 30-day trial license in the customer portal: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=python
12-
para = BarcodeReader.init_dls_connection_parameters()
13-
para.organization_id = "200001"
14-
error = BarcodeReader.init_license_from_dls(para)
11+
error = BarcodeReader.init_license("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9")
1512
if error[0] != EnumErrorCode.DBR_OK:
1613
print("License error: "+ error[1])
1714

samples/performance/read-rate-first-settings.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,9 @@ def output_results(results:TextResult):
7474
if __name__ == "__main__":
7575
try:
7676
# 1.Initialize license.
77-
# The organization id 200001 here will grant you a free public trial license. Note that network connection is required for this license to work.
78-
# If you want to use an offline license, please contact Dynamsoft Support: https://www.dynamsoft.com/company/contact/
77+
# The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
7978
# You can also request a 30-day trial license in the customer portal: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=python
80-
para = BarcodeReader.init_dls_connection_parameters()
81-
para.organization_id = "200001"
82-
error = BarcodeReader.init_license_from_dls(para)
79+
error = BarcodeReader.init_license("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9")
8380
if error[0] != EnumErrorCode.DBR_OK:
8481
print("License error: "+ error[1])
8582

samples/performance/speed-first-settings.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,9 @@ def output_results(results:TextResult):
8080
if __name__ == "__main__":
8181
try:
8282
# 1.Initialize license.
83-
# The organization id 200001 here will grant you a free public trial license. Note that network connection is required for this license to work.
84-
# If you want to use an offline license, please contact Dynamsoft Support: https://www.dynamsoft.com/company/contact/
83+
# The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
8584
# You can also request a 30-day trial license in the customer portal: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=python
86-
para = BarcodeReader.init_dls_connection_parameters()
87-
para.organization_id = "200001"
88-
error = BarcodeReader.init_license_from_dls(para)
85+
error = BarcodeReader.init_license("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9")
8986
if error[0] != EnumErrorCode.DBR_OK:
9087
print("License error: "+ error[1])
9188

samples/use-case/read-dpm-barcode.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@ def output_results(results:TextResult):
1717
if __name__ == "__main__":
1818
try:
1919
# 1.Initialize license.
20-
# The organization id 200001 here will grant you a free public trial license. Note that network connection is required for this license to work.
21-
# If you want to use an offline license, please contact Dynamsoft Support: https://www.dynamsoft.com/company/contact/
20+
# The string "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" here is a free public trial license. Note that network connection is required for this license to work.
2221
# You can also request a 30-day trial license in the customer portal: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=samples&package=python
23-
para = BarcodeReader.init_dls_connection_parameters()
24-
para.organization_id = "200001"
25-
error = BarcodeReader.init_license_from_dls(para)
22+
error = BarcodeReader.init_license("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9")
2623
if error[0] != EnumErrorCode.DBR_OK:
2724
print("License error: "+ error[1])
2825

0 commit comments

Comments
 (0)