Dev Center
Table of contents

Python API Reference

BarcodeReader Class

BarcodeReader Attributes

Attribute Description
version dbr-python version
dbr_version Dynamsoft Barcode Reader version

Constructor and Destructor

Method Description
BarcodeReader Constructor of BarcodeReader object.
get_instance Creates an instance of Dynamsoft Barcode Reader.
recycle_instance Destroys an instance of Dynamsoft Barcode Reader.

License Methods

Method Description
init_license Reads product key and activates the SDK.
get_device_uuid Gets the device uuid used for license activating.
is_instance_valid Gets whether the instance is valid when charging by concurrent instances count.
set_device_friendly_name Sets a human-readable name that identifies the device.
set_license_cache_path Sets a directory path for saving the license cache.
set_max_concurrent_instance_count Sets the max concurrent instance count used for current device and process.
get_instance_pool_status Gets a class to represent the status of an instance pool.
get_idle_instances_count Deprecated
init_license_from_server Deprecated
init_license_from_license_content Deprecated
output_license_to_string Deprecated
init_dls_connection_parameters Deprecated
init_license_from_dls Deprecated
init_lts_connection_parameters Deprecated.
init_license_from_lts Deprecated.

Decode Methods

Method Description
decode_file Decodes barcodes from a specified image file.
decode_buffer Decodes barcodes from the memory buffer containing image pixels in defined format.
decode_file_stream Decodes barcodes from an image file in memory.
decode_buffer_manually Decodes barcodes from the memory buffer containing image pixels in defined format.
decode_base64_string Decodes barcodes from the base64 encoded string.
init_intermediate_result Inits an intermediateResult struct with default values.
decode_intermediate_results Decodes barcode from intermediate results.

Basic Settings Methods

Method Description
set_mode_argument Sets the optional argument for a specified mode in Modes parameters.
get_mode_argument Gets the optional argument for a specified mode in Modes parameters.
get_runtime_settings Gets current runtime settings.
update_runtime_settings Updates runtime settings with a given struct.
reset_runtime_settings Resets all parameters to default values.

Advanced Settings Methods

Method Description
init_runtime_settings_with_file Initializes runtime settings with the settings in a given JSON file.
init_runtime_settings_with_string Initializes runtime settings with the settings in a given JSON string.
append_template_file_to_runtime_settings Appends a new template file to the current runtime settings.
append_template_string_to_runtime_settings Appends a new template string to the current runtime settings.
get_all_template_names Gets the parameter templates name array.
output_settings_to_json_file Outputs runtime settings to a settings file (JSON file).
output_settings_to_json_string Outputs runtime settings to a string.

General Methods

Method Description
transform_coordinates Transform the coordinates of a point based on the given transformation matrix.

Video Methods


Method Description
start_video_mode Starts a new thread to decode barcodes from the inner frame queue.
append_video_frame Appends a frame image buffer to the inner frame queue.
stop_video_mode Stops the frame decoding thread created by start_video_mode().


Method Description
init_frame_decoding_parameters Initializes frame decoding parameters.

Status retrieval

Method Description
get_length_of_frame_queue Gets length of current inner frame queue.

Auxiliary Classes


Error Code

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version
  • Version 10.x
    • Version 10.2.10
    • Version 10.2.0
    • Version 10.0.20
    • Version 10.0.10
    • Version 10.0.0
  • Version 9.x
    • Version 9.6.40
    • Version 9.6.30
    • Version 9.6.20
    • Version 9.6.10
    • Version 9.6.0
    • Version 9.4.0
    • Version 9.2.0
    • Version 9.0.0
  • Version 8.x
    • Version 8.8.0
    • Version 8.6.0
    • Version 8.4.0
    • Version 8.2.0
    • Version 8.1.2
    • Version 8.1.0
    • Version 8.0.0
  • Version 7.x
    • Version 7.6.0
    • Version 7.5.0
Change +