How to create and decode a QR Code in Python using qrtools

This is a mini-How-to for creating and decoding QR Codes in Python using the qr-tools library.

What you need…

First of all you need, you can get it from the QR Toosl Launchpad page:

or you can install it from the QR Tools Stable PPA if you happen to be using Ubuntu:

If you go with the PPA, you can check that qrtools is available in your system like this:

  1. Open a terminal and execute: python
  2. Once you are into python, write import qrtools and press enter; if you don’t get any message everything is OK.
If you choose to download, put the file in the same directory where your script is going to be, for example: /home/me/myproject/.
Once you have the qrtools library available from your python enviroment, we can go on with the next steps.