PyQRCode
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 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 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 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()
Metadata
Release files for PyQRCode 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distributions (sdists)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| PyQRCode-1.2.1.zip | 41.9 kB | Without provenance | Details for PyQRCode-1.2.1.zip | |
| PyQRCode-1.2.1.tar.gz | 37.0 kB | Without provenance | Details for PyQRCode-1.2.1.tar.gz |
Release files / PyQRCode-1.2.1.zip
| Download URL | PyQRCode-1.2.1.zip |
|---|---|
| Size | 41.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b2812775fa6ff5c527977c4cd2ccb07051ca7d0bc0aecf937a43864abe5eff6
|
|
BLAKE2b-256 checksum How to use checksums |
06761aa11ac094c65005b5d8a042b8bd96d73d4e2c32d9a63a68b21278e4b7d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / PyQRCode-1.2.1.tar.gz
| Download URL | PyQRCode-1.2.1.tar.gz |
|---|---|
| Size | 37.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdbf7634733e56b72e27f9bce46e4550b75a3a2c420414035cae9d9d26b234d5
|
|
BLAKE2b-256 checksum How to use checksums |
3761f07226075c347897937d4086ef8e55f0a62ae535e28069884ac68d979316
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for PyQRCode 1.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.