Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

generate qrcode

Project description


pip install qs-qrcode


use in cmd:

qsqrcode -l H -m 唱歌不如跳舞 -s 400 -b 20 -c #569932

or if you did not install with pip:

python -l H -m 唱歌不如跳舞 -s 400 -b 20 -c #569932

and for more usage:

qsqrcode -h

use in python:

from qsqrcode.qrcode import Qrcode

qr = Qrcode('test it')

more usage

from qsqrcode.qrcode import Qrcode

# Qrcode 的第二个参数,L ≈ 7%容错,M ≈ 15%容错,Q ≈ 25%容错,H ≈ 30%容错
Qrcode('test', 'L').generate('testpic/test7.png')
Qrcode('test', 'M').generate('testpic/test8.png')
Qrcode('test', 'Q').generate('testpic/test9.png')
Qrcode('test', 'H').generate('testpic/testA.png')

Qrcode('填充颜色', 'H').colour('#1294B8').resize(250).generate('testpic/test1.png')

Qrcode('填充图片', 'H').paint('pic/testbg.jpg').resize(250).generate('testpic/test2.png')

Qrcode('再看看如何加border', 'H').paint('pic/test.jpg').resize(230).set_border(10).generate('testpic/test3.png')

Qrcode('测试二维码中间加入图片', 'H').put_img_inside('pic/mystic.png').resize(375).generate('testpic/test4.png')

Qrcode('gif试试看,但效果并不好看,而且暂不支持set_border', 'H').fill_gif('pic/pla.gif').resize(250).generate('testpic/testD.gif')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for qs-qrcode, version 1.2
Filename, size File type Python version Upload date Hashes
Filename, size qs-qrcode-1.2.tar.gz (12.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page