Generating QR Codes With Python (Summary)
From restaurant e-menus to airline boarding passes, QR codes have numerous applications that impact your day-to-day life and enrich the user’s experience. Wouldn’t it be great to make them look good, too? With the help of this video course, you’ll learn how to use Python to generate beautiful QR codes for your personal use case.
In its most basic format, a QR code contains black squares and dots on a white background, with information that any smartphone or device with a dedicated QR scanner can decode. Unlike a traditional bar code, which holds information horizontally, a QR code holds the data in two dimensions, and it can hold over a hundred times more information.
In this video course, you’ll learn how to:
- Generate a basic black-and-white QR code
- Change the size and margins of the QR code
- Create colorful QR codes
- Rotate the QR code
- Replace the static background with an animated GIF
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.
00:00 Well done. You’ve made it to the end of the course. Now you have an understanding of how to generate QR codes in Python using the library Segno, you can develop your own beautiful QR codes.
00:12 You can make anything from traditional black and white QR codes to colorful artistic QR codes with rotated and animated backgrounds.
00:21
In this course, you’ve learned how to use .make_qr()
and .save()
to create black and white QR codes. Adjust the module size and quiet zone of your QR code.
00:28
Personalize the dark and light modules with your favorite colors. Use the .to_pil()
rotate method to rotate your QR codes. Save QR codes in multiple different formats.
00:41
Make use of Segno’s helpers
and use of path
objects when saving codes and create QR codes with static and animated image backgrounds using to_artistic ()
.
00:56
Next time you look at a black and white QR code, you can think of the many ways that you could use segno
to generate creative QR codes to capture your user’s attention.
01:06 We hope you found this course useful, and we’ll see you again soon at realpython.com.
Become a Member to join the conversation.