pip install pyBarcode
python
from pyBarcode import Code128
from PIL import Image
barcode_image = barcode.to_image()
barcode_image.save('barcode.png')
python
barcode = Code128('Hello World', options={"width": 400, "height": 200})
python
barcode = Code128('Hello World', options={"foreground": 'red', "background": 'white'})
python
barcode = Code128('Hello World', text="Scan this code")