Use myqr library to create your own QR code

Use myqr library to create your own QR code

I believe my friends have all seen the two-dimensional code of fishing in various groups (manually funny), today I learned the production method (the use of myqr library), and share this neat tool here.
First, configure the python3 environment (you can also use anaconda) and the compiler (pycharm I use).
pip install the myqr library:

pip install myqr

After creating a new project and creating a new file in pycharm

from MyQR import myqr
myqr.run(words='http://www.shdf.gov.cn/',version=10,level='H',picture='C:/Users/Desktop/pic2.jpg',colorized=True,save_name='ddd.png',save_dir='C:/Users/Desktop')

Call the run method of myqr, and explain these parameters here: It
parameter
should be noted that the picture parameter is black and white by default. If you want color, remember to adjust the colorized parameter to true. To make a dynamic QR code, replace the file in the picture with'xxx.gif'

Guess you like

Origin blog.csdn.net/weixin_44699275/article/details/109910869