可以通过easy_install qrcode 安装,也可以到:https://github.com/lincolnloop/python-qrcode 下载
简单用法
import qrcode
img = qrcode.make('Some data here')
高级用法
import qrcode
qr = qrcode.QRCode(
version=1,
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size=10,
border=4,
)
qr.add_data('Some data')
qr.make(fit=True)
img = qr.make_image()
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/8343.html