Skip to main content

generate qrcode

Project description

install:

pip install qs-qrcode

usage

use in cmd:

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

or if you did not install with pip:

python qsqrcode.py -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')
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')

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.

Source Distribution

qs-qrcode-1.2.tar.gz (12.3 kB view details)

Uploaded Source

File details

Details for the file qs-qrcode-1.2.tar.gz.

File metadata

  • Download URL: qs-qrcode-1.2.tar.gz
  • Upload date:
  • Size: 12.3 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

Hashes for qs-qrcode-1.2.tar.gz
Algorithm Hash digest
SHA256 96e3a29c07a902c8bfc3d435ff04edf049c1ffae738722d73c379403c99061d8
MD5 f36fc70a4e027a174653e7dac71dec48
BLAKE2b-256 e3f55ae5ccd689b41498fee3cbfa6ac38630c89d84221277bd76f4a96085c9a4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page