Breaking

Saturday 16 March 2019

How to Create QR for your URL in Python?

How to Create QR for your URL in Python?


Requirements:

1. Python 2.6 or higher
2. pyqrcode package 
3. A URL for which you want to make QR code. 


1.Install Package:


In Command Prompt type

>>pip install pyqrcode



2. Write Following script and save as .py


     #Import QRCode from pyqrcode 
     import pyqrcode 
     from pyqrcode import QRCode 

     # String which represent the QR code 
     s = "dtechno-hacker.blogspot.in"

     # Generate QR code 
     url = pyqrcode.create(s) 

     # Create and save the svg file naming "QR.svg" 
     url.svg("QR.svg", scale = 8)


3.Run the Script

3.Go tho thw folder were you saved the save Script and find for QR.svg


No comments:

Post a Comment