Using Python code to generate QR code from any Text or URL. I found an awesome convenience Python library called "Segno" that can generate QR codes very easily. This is an example of using the "Segno" library's helper function to generate Text or URL QR codes and save it as PNG image file format. Enjoy.
Here is an example.
URL (http://www.google.com)