A library to display QR codes in console.
Project description
QRConsole
A library to display QR codes in console.
Requirements
Pillow>=7.0.0 - Download using python
or python3 -m pip install "Pillow>=7.0.0"
Installation
PyPI
To get the module through PyPi: pip install qrconsole
.
GitHub (Pulled Repo)
To install the module by pulling the repo: python setup.py install
.
How to use
QRConsole is pretty straight-forward. Provide an image, and it will return a string with the console-ified version.
The image provided must be black-and-white. If there are greys, they will be turned into white or black depending on which they are closer to.
A good site for creation is this one, since there is no rounding or styling, just b&w pixels.
It is recommended to keep the images as small as possible, since every pixel of the image is two characters in the console. The example image is 65x65 px.
Use
- Initialize
from qrconsole import QRConsole
qr = QRConsole(char="@") # char = The character to use for white in the QR Code. Must have a length of 1.
- Console-ify image
print(qr.consoleify(qr_img="example_code.png")) # qr_img = The path to the QR Code image.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for qrconsole-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd6b09639384ebc0dfbceecff5291c05f72e43b4678954e673507434d213bffd |
|
MD5 | 4f5d5aae4f9093e70bcafa547ed4a97a |
|
BLAKE2b-256 | ca538709a7feb038e303dc9219fe36bf3d1527bdf1b8f811dc0c0d194aa4b9fd |