import code128
text = '1234567890'
img = code128.image(text, thickness=3)
img.save(r'D:\Case\Code128\code128.png')
import os
from PIL import Image
from pyzbar import pyzbar
print(pyzbar.decode(Image.open(r'D:\Case\Code128\code128.png'))[0].data.decode("utf-8"))