DEV Community

Cover image for QR Code Generator using Python
Hillary Nyakundi
Hillary Nyakundi

Posted on

QR Code Generator using Python

Ever wondered to yourself how easy it can be to create a QR code without a need of a website or third party software?
Actually t's pretty much easier, thanks to python. With python we an make use of only 2 lines of code to make this happen.
We will be able to create QR Codes for URLs and even any text we wish to.

Have a doubt, let me show you below:

This is another article on the Python Projects for Beginner Series 💻,

Are you looking for an Open Source Project to contribute to: Check out this REPO and add your CONTRIBUTION and give it a Star⭐

Let's Get Started

Steps To Create QR Code Generator.

  1. Make sure you have a code editor and python installed in your computer.(preferred IDE pycharm)
  2. Open PyCharm, Click file->New Project. and specify the file or folder location for your work.
  3. In your folder you just created, you will need to create a python file. Right Click on folder-> New-> Select python file. Give it a name with a name with a py extentension ex:
  4. Start Coding;

First things first, we need to install a library to help us with this functionality:
Open the terminal and paste in:
pip install qrcode
After the installation, in our file let write code:

import qrcode

image = qrcode.make("PAste in your URL")"name to save it") 
Enter fullscreen mode Exit fullscreen mode

See the full video and Github to see how you can input your own text and not the URL links.
Full Code Link: Here

Check Out Video Tutorial:
QR Code Gen Using Python

If You have read this far I really appreciate, Help me to grow my community:

Check out my other Blogs too:

Connect With me at Twitter | Insta | YouTube | LinkedIn | GitHub

Do share your valuable opinion, I appreciate your honest feedback!

Enjoy Coding ❤

Top comments (2)

david_hrycik_775a71e13d16 profile image
David Hrycik

This does NOT work in pycharm, which you claim it does. Don’t post lies

larymak profile image
Hillary Nyakundi

I don't know why it doesn't work on your end. Maybe indicating the error you got could help us find the solution