qrpipe
qrpipe turns piped input into a QR code or QR image.
The smallest useful interaction is:
printf '%s' 'https://example.com' | qrpipe
By default, qrpipe renders a compact QR code in the terminal. With --output, it writes a
file whose format is inferred from the extension by Segno.
Install for development
python3.10 -m venv .venv
.venv/bin/python -m pip install -e '.[dev]'
.venv/bin/qrpipe --help
Examples
printf '%s' 'https://example.com' | qrpipe
echo 'https://example.com' | qrpipe
cat payload.txt | qrpipe
qrpipe 'https://example.com'
printf '%s' 'https://example.com' | qrpipe --output example.png --size 8
printf '%s' 'https://example.com' | qrpipe -o example.svg --size 4
printf '%s' 'https://example.com' | qrpipe -o example.png --open
printf '%s' 'important payload' | qrpipe --redundancy H
--size controls the output module scale; --scale is an alias. --redundancy (also
--error) selects the exact QR error-correction level: L, M, Q, or H. --open is an
explicit opt-in that opens an image file with the operating system's default viewer; it requires
--output.
Structured payloads
The default --type text leaves the payload unchanged. --type phone converts a human-readable
number into a tel: URI:
printf '%s\n' '+1 (555) 010-1234' | qrpipe --type phone -o phone.png
--type vcard accepts a complete vCard, common property lines (FN:, TEL:, EMAIL:, ORG:),
or a plain name, which becomes a minimal vCard:
printf '%s' 'Ada Lovelace' | qrpipe --type vcard -o ada.svg
printf '%s\n' 'FN:Ada Lovelace' 'EMAIL:ada@example.test' | qrpipe --type vcard -o ada.svg
Structured payloads must be UTF-8. Ordinary text input is read as bytes and passed to Segno without a decode/re-encode round trip.
Input and output semantics
- A positional
DATAvalue takes precedence over standard input and is treated literally. - When reading standard input, exactly one final
\nor\r\nis removed by default. Use--preserve-newlinewhen that line ending is meaningful payload data. - Empty input exits with status
2; whitespace is valid data. - Running
qrpipewith no argument on an interactive terminal exits immediately with guidance instead of waiting forever for EOF. - File output is written beside the destination and atomically replaces an existing destination.
- PNG and SVG are the normal file formats; Segno also supports other formats selected by extension.
Successful terminal output contains only the QR rendering. Diagnostics never include the original payload, which matters for URLs with tokens, Wi-Fi credentials, OTP setup URIs, and other secrets.
Deliberate boundaries
qrpipe always creates ordinary QR codes. Micro QR, structured-append sequences, explicit Segno encoding modes, and additional helper formats such as Wi-Fi, email, geo, MeCard, and EPC payment QR are intentionally outside this small initial interface.
Development
.venv/bin/python -m scripts.ci
This runs compilation, Ruff, branch coverage, build/metadata checks, Pyright, Markdown linting, and pre-commit. GitHub Actions runs the same gates on Ubuntu, macOS, and Windows with Python 3.10 through 3.14.
Releasing
- Push the release commit and wait for CI to pass.
- Configure PyPI and TestPyPI trusted publishers for this repository's corresponding workflows.
- Tag that commit as
vX.Y.Zand push the tag. - Run Publish to TestPyPI from GitHub Actions against the tag and install the result in a fresh environment.
- Create a GitHub release from the same tag to publish to PyPI.
License
MIT. See LICENSE.
Metadata
Release files for qrpipe 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qrpipe-0.1.1.tar.gz | 16.9 kB | Without provenance | Details for qrpipe-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qrpipe-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for qrpipe-0.1.1-py3-none-any.whl |
Total release size: 25.8 kB
Release files / qrpipe-0.1.1.tar.gz
| Download URL | qrpipe-0.1.1.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ad644f9afad5baee0ae42a19235a09d084cfb203fc49c2f59e8a83233977520
|
|
BLAKE2b-256 checksum How to use checksums |
94eeb40e7181e18f326731f6d0834a133cefce9b7f1b8c59946177a90389babf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / qrpipe-0.1.1-py3-none-any.whl
| Download URL | qrpipe-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d90b8d5b61632749853ff9b01394472e24235127d636ea1a818aa921d3be56d
|
|
BLAKE2b-256 checksum How to use checksums |
5a616a426810e62aed6346373db7c7934357aa2fa52cbf1bc34a64622132c307
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Security for qrpipe 0.1.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.