PyQRCode
A QR code generator written purely in Python with SVG, EPS, PNG and terminal output.
What it is and what it does
PyQRCode is a pure-Python QR code generator that encodes data into QR codes and renders them in multiple formats: SVG, EPS, PNG (with optional pypng), and plain text for terminal display. It aims to follow the QR code standard closely and exposes all encoding properties for manual control, though most simple use cases require only two lines of code.
The package has no runtime dependencies and works with Python 2.6, 2.7, and 3.x. It is used for generating QR codes programmatically without requiring PIL or other image libraries for SVG and text output. The long gap since its last release (2016) and dormant maintenance status mean it may not track the latest Python ecosystem changes, though the repository remains accessible and the core QR encoding algorithm is stable.
Use it for:
- Generate QR codes for URLs or contact information and export them as SVG for web embedding.
- Create QR codes in terminal applications for display in Linux terminal emulators without external image rendering.
- Batch-generate QR codes with custom error correction levels and versions for inventory or tracking systems.
- Embed QR code generation in legacy Python 2 applications where modern alternatives may not be compatible.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyQRCode generates QR codes in pure Python and outputs them as SVG, EPS, PNG (with optional pypng), or terminal text, with full control over encoding properties.
Yes, with conditions. PyQRCode is worth installing if you need simple QR code generation without external image library dependencies and can tolerate dormant maintenance. The pure-Python implementation and zero runtime dependencies make it lightweight and portable. However, verify compatibility with your Python version before adopting, and consider more actively maintained alternatives if you require PNG output or ongoing feature development.
Install
pyqrcode on PyPI
pip
pip install pyqrcodeuv
uv add pyqrcodepoetry
poetry add pyqrcodeInstalling PyQRCode
Before you install
Installation friction is high: the package has not been updated since 2016-06-20 and is marked dormant, though the repository remains active with 427 stars and a recent commit in 2024-04-15. No runtime dependencies simplify installation, but the long gap between releases raises questions about maintenance.
License in practice
BSD license (permissive) places no significant restrictions on use, modification, or redistribution in commercial or private projects.
Quickstart
pip install pyqrcode
import pyqrcode
url = pyqrcode.create('http://example.com')
url.svg('output.svg', scale=8)
Optional: install pypng to render PNG output; otherwise SVG, EPS, and terminal output work without additional dependencies.
Verify before relying
- Whether the package works reliably with modern Python versions (3.9+) despite no recent releases.
- Whether PNG rendering via pypng is actively maintained and compatible with current pypng versions.
- Current state of the repository and whether dormancy indicates abandonment or stable maintenance.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | dormant — 3,707 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 636,634/month — #5,624 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: PyQRCode-1.2.1.tar.gz; PyQRCode-1.2.1.zip
Keywords: qrcode, qr
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
qrcodeGenerates QR codes as images (PNG, SVG) or…
permissive · top 1,000 on PyPI
segnoGenerates QR codes and Micro QR codes…
permissive · top 5,000 on PyPI
django-qr-codeGenerates QR codes as embedded SVG or PNG…
permissive · top 15,000 on PyPI
pyStrichpyStrich generates 1D and 2D barcodes (Code 39,…
permissive · top 15,000 on PyPI
pdf417genEncodes text and binary data into PDF417 2D…
permissive · top 15,000 on PyPI
pypngPyPNG reads and writes PNG image files in pure…
permissive · top 5,000 on PyPI
treepoemGenerates barcodes and QR codes as image…
permissive · top 5,000 on PyPI
svg.pyGenerates SVG files programmatically in Python…
permissive · top 15,000 on PyPI
ppf-datamatrixGenerates datamatrix codes (2D barcodes) in SVG…
permissive · top 15,000 on PyPI
CairoSVGCairoSVG converts SVG files to PDF, EPS, PS,…
copyleft · top 5,000 on PyPI