Package: amzqr
Amazing-QR转到中文版OverviewPython QR Code GeneratorGeneratecommon qr-code,artistic qr-code (black & white or colorized),animated qr-code (black & white or colorized).Contents[toc]ExamplesInstall# via pippipinstallamzqrUsageTerminal Way(TIPS: If you haven't installamzqr, you shouldpython(3) amzqr.pyinstead ofamzqrblow.)# summaryamzqrWords[-v{1,2,3,...,40}][-l{L,M,Q,H}][-noutput-filename][-doutput-directory][-ppicture_file][-c][-concontrast][-bribrightness]seeCommon QR-CodeforWords,-v,-l,-n,-dseeArtistic QR-Codefor-p,-c,-con,-briseeAnimated GIF QR-Codeabout GIFCommon QR-Code#1 Wordsamzqr https://github.comJust input a URL or a sentence, then get your QR-Code named 'qrcode.png' in the current directory.#2 -v, -lamzqr https://github.com -v 10 -l QThedefaultsize of QR-Code depends both on the numbers of words you input and the level, while thedefaultlevel (Error Correction Level) isH(the highest).Customize: If you want to control the size and the error-correction-level, use the-vand-larguments.-vrepresenting the length is from a minimum of1to a maximum of40.-lrepresenting the error correction level is one ofL, M, Q and H, where L is the lowest level and H is the highest.#3 -n, -damzqr https://github.com   -n github_qr.jpg   -d .../paths/Thedefaultoutput-filename is 'qrcode.png', while thedefaultoutput-directory is current directory.Customize: You can name the output-file and decide the output-directory.Noticethat if the name is as same as a existing file, the old one will be deleted.-nrepresenting the output-filename could be in the format one of.jpg，.png，.bmp，.gif.-dmeans directory.Artistic QR-Code#1 -pamzqr https://github.com -p github.jpgThe-pis to combine the QR-Code with the following picture which is in the same directory as the program. The resulting picture isblack and whiteby default.#2 -camzqr https://github.com -p github.jpg -cThe-cis to make the resulting picturecolorized.#3 -con, -briamzqr https://github.com -p github.jpg [-c] -con 1.5 -bri 1.6The-conflag changes thecontrastof the picture - a low number corresponds to low contrast and a high number to high contrast.Default: 1.0.The-briflag changes thebrightnessand the parameter values work the same as those for-con.Default: 1.0.Animated GIF QR-CodeThe only difference from Artistic QR-Code mentioned above is that you should input an image file in the.gifformat. The you can get your black-and-white or colorful qr-code. Remember that when you use-nto customize the output-filename, then the output-filename must end by.gif.Import Wayfromamzqrimportamzqrversion,level,qr_name=amzqr.run(words,version=1,level='H',picture=None,colorized=False,contrast=1.0,brightness=1.0,save_name=None,save_dir=os.getcwd())details about each parameter are as mentionedabove# help(amzqr)Positionalparameterwords:strOptionalparametersversion:int,from1to40level:str,justoneof('L','M','Q','H')picutre:str,afilenameofaimagecolorized:boolconstrast:floatbrightness:floatsave_name:str,theoutputfilenamelike'example.png'save_dir:str,theoutputdirectoryTipsUse a nearlysquarepicture instead of a rectangle one.If the size of the picture is large, you should also choose arightlylarge-vinstead of using the default one.If part of the picture is transparent, the qr code will look like:You can change the transparent layer to white, and then it will look like:Supported CharactersNumbers:0~9Letters:a~z, A~ZCommon punctuations:· , . : ; + - * / \ ~ ! @ # $ % ^ & ` ' = < > [ ] ( ) ? _ { } | and  (space)EnvironmentPython 3LicenseGPLv3