{"id":3266,"date":"2022-08-16T23:54:46","date_gmt":"2022-08-16T18:24:46","guid":{"rendered":"https:\/\/cbsepython.in\/?p=3266"},"modified":"2024-02-26T19:54:01","modified_gmt":"2024-02-26T14:24:01","slug":"generate-qr-code-using-python","status":"publish","type":"post","link":"https:\/\/cbsepython.in\/generate-qr-code-using-python\/","title":{"rendered":"Generate QR Code using Python"},"content":{"rendered":"<h2>How to Generate QR Code using Python?<\/h2>\n<p>&nbsp;<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#pip install pyqrcode\r\n#pip install pypng\r\n# Import QRCode from pyqrcode\r\nimport pyqrcode\r\nimport png\r\nfrom pyqrcode import QRCode\r\n\r\n\r\n# String for which website you want to enerate the QR code\r\nwebsite_url = \"https:\/\/cbsepython.in\/\"\r\n\r\n# Generate QR code\r\nurl = pyqrcode.create(website_url)\r\n\r\n\r\n# Create and save the png file naming \"myqr_code.png\"\r\nurl.png('myqr_code.png', scale = 10)\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Output:<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-medium wp-image-3267\" src=\"https:\/\/cbsepython.in\/wp-content\/uploads\/2022\/08\/myqr_code-300x300.png\" alt=\"\" width=\"300\" height=\"300\" title=\"\" srcset=\"https:\/\/cbsepython.in\/wp-content\/uploads\/2022\/08\/myqr_code-300x300.png 300w, https:\/\/cbsepython.in\/wp-content\/uploads\/2022\/08\/myqr_code-150x150.png 150w, https:\/\/cbsepython.in\/wp-content\/uploads\/2022\/08\/myqr_code.png 370w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Generate QR Code using Python? &nbsp; #pip install pyqrcode #pip install pypng # Import QRCode from pyqrcode import pyqrcode import png from pyqrcode import QRCode # String for which website you want to enerate the QR code website_url = &#8220;https:\/\/cbsepython.in\/&#8221; # Generate QR code url = pyqrcode.create(website_url) # Create and save the png [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[],"class_list":["post-3266","post","type-post","status-publish","format-standard","hentry","category-python-projects"],"_links":{"self":[{"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/posts\/3266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/comments?post=3266"}],"version-history":[{"count":0,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/posts\/3266\/revisions"}],"wp:attachment":[{"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/media?parent=3266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/categories?post=3266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/tags?post=3266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}