module documentation

Undocumented

Class BitBuffer Undocumented
Class Polynomial Undocumented
Class QRCode No class docstring; 0/9 instance variable, 6/15 methods documented
Class QRData Data held in a QR compatible format.
Class RSBlock Undocumented
Exception DataOverflowError Undocumented
Function BCH_digit Undocumented
Function BCH_type_info Undocumented
Function BCH_type_number Undocumented
Function create_bytes Undocumented
Function create_data Undocumented
Function gexp Undocumented
Function glog Undocumented
Function length_in_bits Undocumented
Function make Undocumented
Function make_lost_point Undocumented
Function make_mask_func Return the mask function for the given mask pattern.
Function make_rs_blocks Undocumented
Function mode_sizes_for_version Undocumented
Function optimal_data_chunks An iterator returning QRData chunks optimized to the data content.
Function optimal_mode Calculate the optimal mode for this chunk of data.
Function pattern_position Undocumented
Function to_bytestring Convert data to a (utf-8 encoded) byte-string if it isn't a byte-string already.
Constant ALPHA_NUM Undocumented
Constant BIT_LIMIT_TABLE Undocumented
Constant ERROR_CORRECT_H LUT
Constant ERROR_CORRECT_L Undocumented
Constant ERROR_CORRECT_M Undocumented
Constant ERROR_CORRECT_Q Undocumented
Constant EXP_TABLE Undocumented
Constant G15 Undocumented
Constant G15_MASK Undocumented
Constant G18 Undocumented
Constant LOG_TABLE Undocumented
Constant MODE_8BIT_BYTE Undocumented
Constant MODE_ALPHA_NUM Undocumented
Constant MODE_KANJI Undocumented
Constant MODE_NUMBER Undocumented
Constant MODE_SIZE_LARGE Undocumented
Constant MODE_SIZE_MEDIUM Undocumented
Constant MODE_SIZE_SMALL Undocumented
Constant NUMBER_LENGTH Undocumented
Constant PAD0 Undocumented
Constant PAD1 Undocumented
Constant PATTERN_POSITION_TABLE Undocumented
Constant RE_ALPHA_NUM Undocumented
Constant RS_BLOCK_OFFSET Undocumented
Constant RS_BLOCK_TABLE Undocumented
Variable rsPoly_LUT Base
Function _check_box_size Undocumented
Function _check_mask_pattern Undocumented
Function _check_version Undocumented
Function _lost_point_level1 Undocumented
Function _lost_point_level2 Undocumented
Function _lost_point_level3 Undocumented
Function _lost_point_level4 Undocumented
Function _optimal_split Undocumented
Variable _data_count Undocumented
def BCH_digit(data):

Undocumented

def BCH_type_info(data):

Undocumented

def BCH_type_number(data):

Undocumented

def create_bytes(buffer, rs_blocks):

Undocumented

def create_data(version, error_correction, data_list):

Undocumented

def gexp(n):

Undocumented

def glog(n):

Undocumented

def length_in_bits(mode, version):

Undocumented

def make(data=None, **kwargs):

Undocumented

def make_lost_point(modules):

Undocumented

def make_mask_func(pattern):

Return the mask function for the given mask pattern.

def make_rs_blocks(version, error_correction):

Undocumented

def mode_sizes_for_version(version):

Undocumented

def optimal_data_chunks(data, minimum=4):

An iterator returning QRData chunks optimized to the data content.

:param minimum: The minimum number of bytes in a row to split as a chunk.

def optimal_mode(data):

Calculate the optimal mode for this chunk of data.

def pattern_position(version):

Undocumented

def to_bytestring(data):

Convert data to a (utf-8 encoded) byte-string if it isn't a byte-string already.

ALPHA_NUM: bytes =

Undocumented

Value
b'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:'
BIT_LIMIT_TABLE =

Undocumented

Value
[[0] + [8 * sum(map(_data_count, make_rs_blocks(version, error_correction))) for
 version in range(1, 41)] for error_correction in range(4)]
ERROR_CORRECT_H: int =

LUT

Formerly in LUT.py

Value
2
ERROR_CORRECT_L: int =

Undocumented

Value
1
ERROR_CORRECT_M: int =

Undocumented

Value
0
ERROR_CORRECT_Q: int =

Undocumented

Value
3
EXP_TABLE =

Undocumented

Value
list(range(256))
G15 =

Undocumented

Value
1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0
G15_MASK =

Undocumented

Value
1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1
G18 =

Undocumented

Value
1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0
LOG_TABLE =

Undocumented

Value
list(range(256))
MODE_8BIT_BYTE =

Undocumented

Value
1 << 2
MODE_ALPHA_NUM =

Undocumented

Value
1 << 1
MODE_KANJI =

Undocumented

Value
1 << 3
MODE_NUMBER =

Undocumented

Value
1 << 0
MODE_SIZE_LARGE =

Undocumented

Value
{MODE_NUMBER: 14, MODE_ALPHA_NUM: 13, MODE_8BIT_BYTE: 16, MODE_KANJI: 12}
MODE_SIZE_MEDIUM =

Undocumented

Value
{MODE_NUMBER: 12, MODE_ALPHA_NUM: 11, MODE_8BIT_BYTE: 16, MODE_KANJI: 10}
MODE_SIZE_SMALL =

Undocumented

Value
{MODE_NUMBER: 10, MODE_ALPHA_NUM: 9, MODE_8BIT_BYTE: 8, MODE_KANJI: 8}
NUMBER_LENGTH: dict[int, int] =

Undocumented

Value
{3: 10, 2: 7, 1: 4}
PAD0: int =

Undocumented

Value
236
PAD1: int =

Undocumented

Value
17
PATTERN_POSITION_TABLE: list[bytes] =

Undocumented

Value
[b'',
 b'\x06\x12',
 b'\x06\x16',
 b'\x06\x1a',
 b'\x06\x1e',
 b'\x06"',
 b'\x06\x16&',
...
RE_ALPHA_NUM =

Undocumented

Value
re.compile((b'^[' + ALPHA_NUM + b']*'))
RS_BLOCK_OFFSET =

Undocumented

Value
{ERROR_CORRECT_L: 0, ERROR_CORRECT_M: 1, ERROR_CORRECT_Q: 2, ERROR_CORRECT_H: 3}
RS_BLOCK_TABLE: list[bytes] =

Undocumented

Value
[b'\x01\x1a\x13',
 b'\x01\x1a\x10',
 b'\x01\x1a\r',
 b'\x01\x1a\t',
 b'\x01,"',
 b'\x01,\x1c',
 b'\x01,\x16',
...
rsPoly_LUT: dict[int, bytes] =

Base

Formerly in base.py

def _check_box_size(size):

Undocumented

def _check_mask_pattern(mask_pattern):

Undocumented

def _check_version(version):

Undocumented

def _lost_point_level1(modules, modules_count):

Undocumented

def _lost_point_level2(modules, modules_count):

Undocumented

def _lost_point_level3(modules, modules_count):

Undocumented

def _lost_point_level4(modules, modules_count):

Undocumented

def _optimal_split(data, pattern):

Undocumented

_data_count =

Undocumented