PyQRCode


NamePyQRCode JSON
Version 1.2.1 PyPI version JSON
download
home_pagehttps://github.com/mnooner256/pyqrcode
SummaryA QR code generator written purely in Python with SVG, EPS, PNG and terminal output.
upload_time2016-06-20 03:28:03
maintainerNone
docs_urlhttps://pythonhosted.org/PyQRCode/
authorMichael Nooner
requires_pythonNone
licenseBSD
keywords qrcode qr
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ========
PyQRCode
========

.. 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 <https://pypi.python.org/pypi/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
standard.

**Homepage**: https://github.com/mnooner256/pyqrcode

**Documentation**: http://pythonhosted.org/PyQRCode/

Requirements
============

The pyqrcode module only requires Python 2.6, Python 2.7, or Python 3. You may
want to install `pypng <https://pypi.python.org/pypi/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
============

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

    $ pip install pyqrcode

Or from the terminal::

    $ python setup.py install


Usage
=====

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
file.
::

    >>> import pyqrcode
    >>> url = pyqrcode.create('http://uca.edu')
    >>> 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 <https://pypi.python.org/pypi/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])
    >>> big_code.show()
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mnooner256/pyqrcode",
    "name": "PyQRCode",
    "maintainer": null,
    "docs_url": "https://pythonhosted.org/PyQRCode/",
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "qrcode,qr",
    "author": "Michael Nooner",
    "author_email": "mnooner256@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/37/61/f07226075c347897937d4086ef8e55f0a62ae535e28069884ac68d979316/PyQRCode-1.2.1.tar.gz",
    "platform": "UNKNOWN",
    "description": "========\nPyQRCode\n========\n\n.. contents::\n\nThe pyqrcode module is a QR code generator that is simple to use and written\nin pure python. The module can automates most of the building process for\ncreating QR codes. Most codes can be created using only two lines of code!\n\nUnlike other generators, all of the helpers can be controlled manually. You are\nfree to set any or all of the properties of your QR code.\n\nQR codes can be saved as SVG, PNG (by using the\n`pypng <https://pypi.python.org/pypi/pypng/>`_ module), and plain text. They can\nalso be displayed directly in most Linux terminal emulators. PIL is\nnot used to render the image files.\n\nThe pyqrcode module attempts to follow the QR code standard as closely as\npossible. The terminology and the encodings used in pyqrcode come directly\nfrom the standard. This module also follows the algorithm laid out in the\nstandard.\n\n**Homepage**: https://github.com/mnooner256/pyqrcode\n\n**Documentation**: http://pythonhosted.org/PyQRCode/\n\nRequirements\n============\n\nThe pyqrcode module only requires Python 2.6, Python 2.7, or Python 3. You may\nwant to install `pypng <https://pypi.python.org/pypi/pypng/>`_ in order to\nrender PNG files, but it is optional. Note, pypng is a pure python PNG writer\nwhich does not require any other libraries.\n\nInstallation\n============\n\nInstallation is simple. It can be installed from pip using the following\ncommand::\n\n    $ pip install pyqrcode\n\nOr from the terminal::\n\n    $ python setup.py install\n\n\nUsage\n=====\n\nThe pyqrcode module aims to be as simple to use as possible. Below is a simple\nexample of creating a QR code for a URL. The code is rendered out as an svg\nfile.\n::\n\n    >>> import pyqrcode\n    >>> url = pyqrcode.create('http://uca.edu')\n    >>> url.svg('uca-url.svg', scale=8)\n    >>> url.eps('uca-url.eps', scale=2)\n    >>> print(url.terminal(quiet_zone=1))\n\nThe pyqrcode module, while easy to use, is powerful. You can set every\nproperty of the QR code. If you install the optional\n`pypng <https://pypi.python.org/pypi/pypng/>`_ module, you can\nrender the code as a PNG image. Below is a more complex example::\n\n    >>> big_code = pyqrcode.create('0987654321', error='L', version=27, mode='binary')\n    >>> big_code.png('code.png', scale=6, module_color=[0, 0, 0, 128], background=[0xff, 0xff, 0xcc])\n    >>> big_code.show()",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "A QR code generator written purely in Python with SVG, EPS, PNG and terminal output.",
    "version": "1.2.1",
    "split_keywords": [
        "qrcode",
        "qr"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "371f29f4b03bd2830c6e0319258b1259",
                "sha256": "fdbf7634733e56b72e27f9bce46e4550b75a3a2c420414035cae9d9d26b234d5"
            },
            "downloads": -1,
            "filename": "PyQRCode-1.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "371f29f4b03bd2830c6e0319258b1259",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 36989,
            "upload_time": "2016-06-20T03:28:03",
            "upload_time_iso_8601": "2016-06-20T03:28:03.411418Z",
            "url": "https://files.pythonhosted.org/packages/37/61/f07226075c347897937d4086ef8e55f0a62ae535e28069884ac68d979316/PyQRCode-1.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "c8f4fb91e3c2407466acf723eed868b0",
                "sha256": "1b2812775fa6ff5c527977c4cd2ccb07051ca7d0bc0aecf937a43864abe5eff6"
            },
            "downloads": -1,
            "filename": "PyQRCode-1.2.1.zip",
            "has_sig": false,
            "md5_digest": "c8f4fb91e3c2407466acf723eed868b0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 41924,
            "upload_time": "2016-06-20T03:28:07",
            "upload_time_iso_8601": "2016-06-20T03:28:07.967347Z",
            "url": "https://files.pythonhosted.org/packages/06/76/1aa11ac094c65005b5d8a042b8bd96d73d4e2c32d9a63a68b21278e4b7d2/PyQRCode-1.2.1.zip",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2016-06-20 03:28:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "mnooner256",
    "github_project": "pyqrcode",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "pyqrcode"
}
        
Elapsed time: 0.12115s