A library to generate barcodes
Project description
Barcodes python module
Thanks to Melisa for her precious help.
⚠️ This python package is still in development. ⚠️
- For now only QR codes are available. Only alphanumeric and byte encodings are available.
Installation
pip install barcodes-uc
You might want to install the package in a virtual environment. For that do:
python3 -m venv venv
source venv/bin/activate
pip install barcodes-uc
Usage
from barcodes_uc.qrcodes import qrgenerator, qrutils
# Generate a QR code
message = "Hello world!"
encoding = qrutils.QREncoding.byte
version, error_correction_level, qr = qrgenerator.get_min_version(message, encoding, qrutils.QRErrorCorrectionLevels.Q)
generator = qrgenerator.QRGenerator(msg=message, encoding=encoding, version=version, error_correction=error_correction_level)
qr = generator.generate()
qr.show() # Show the QR code in the terminal
qr.save("qr.png", imgSize = 1000, colour=[qrgenerator.QRColour.red]) # Save the QR code in a file
Future work
-
Add byte and numeric encoding to qr codes.
-
Save qr code as image in different styles.
-
Generate barcodes.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
barcodes_uc-0.6.2.tar.gz
(26.6 kB
view hashes)
Built Distribution
Close
Hashes for barcodes_uc-0.6.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cccb63a56d1c6f6aeff07b771b3a1c46b8d5280ef29c8c15db2b21a1b2746e1f |
|
MD5 | 29c23867847b77def2048603bc2dc7a5 |
|
BLAKE2b-256 | 7768ca517419524035a02122519aac9cd8ed4431dd37c32d8fac3295941a853d |