Codebase list python-pyqrcode / upstream/1.2.1+git20160619.1.674a77b PKG-INFO

Tree @upstream/1.2.1+git20160619.1.674a77b (Download .tar.gz)

PKG-INFO @upstream/1.2.1+git20160619.1.674a77braw · history · blame

Metadata-Version: 2.1
Name: PyQRCode
Version: 1.2.1
Summary: A QR code generator written purely in Python with SVG, EPS, PNG and terminal output.
Author: Michael Nooner
License: BSD
Keywords: qrcode,qr
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Provides-Extra: PNG


.. contents::

The pyqrcode module is a QR code generator that is simple to use and written
in pure python. The module can automates most of the building process for
creating QR codes. Most codes can be created using only two lines of code!

Unlike other generators, all of the helpers can be controlled manually. You are
free to set any or all of the properties of your QR code.

QR codes can be saved as SVG, PNG (by using the
`pypng <>`_ module), and plain text. They can
also be displayed directly in most Linux terminal emulators. PIL is
not used to render the image files.

The pyqrcode module attempts to follow the QR code standard as closely as
possible. The terminology and the encodings used in pyqrcode come directly
from the standard. This module also follows the algorithm laid out in the




The pyqrcode module only requires Python 2.6, Python 2.7, or Python 3. You may
want to install `pypng <>`_ in order to
render PNG files, but it is optional. Note, pypng is a pure python PNG writer
which does not require any other libraries.


Installation is simple. It can be installed from pip using the following

    $ pip install pyqrcode

Or from the terminal::

    $ python install


The pyqrcode module aims to be as simple to use as possible. Below is a simple
example of creating a QR code for a URL. The code is rendered out as an svg

    >>> import pyqrcode
    >>> url = pyqrcode.create('')
    >>> url.svg('uca-url.svg', scale=8)
    >>> url.eps('uca-url.eps', scale=2)
    >>> print(url.terminal(quiet_zone=1))

The pyqrcode module, while easy to use, is powerful. You can set every
property of the QR code. If you install the optional
`pypng <>`_ module, you can
render the code as a PNG image. Below is a more complex example::

    >>> big_code = pyqrcode.create('0987654321', error='L', version=27, mode='binary')
    >>> big_code.png('code.png', scale=6, module_color=[0, 0, 0, 128], background=[0xff, 0xff, 0xcc])