generate qrcode
Project description
install:
pip install qs-qrcode
usage
use in python:
from qsqrcode.qrcode import Qrcode
qr = Qrcode('test it')
qr.generate('testpic/test.png')
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')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qs-qrcode-0.9.tar.gz
(10.7 kB
view details)
File details
Details for the file qs-qrcode-0.9.tar.gz.
File metadata
- Download URL: qs-qrcode-0.9.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.14.2 setuptools/36.4.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1d4a3e2250506b4e00d6e3e6017189c579a425fabc6b4645b63fbc2fca64de5
|
|
| MD5 |
ab97de873fa5338faa0f67b6aa0b8f23
|
|
| BLAKE2b-256 |
4873ee57663d14990c51d0e50b3f70ebb8b20a3a4adf1a1b67c09e5b3b3b55c9
|