pyStrich ******** pyStrich is a Python module for generating 1D and 2D barcodes. It supports Code 39, Code 128, EAN-13, Data Matrix and QR Code symbologies. All five emit PNG (via "Pillow"), SVG and EPS. Data Matrix and QR Code additionally render to terminal art and DXF for direct part marking. pyStrich is encoder-only -- it does not read barcodes. * Source: https://github.com/mmulqueen/pyStrich * PyPI: https://pypi.org/project/pyStrich/ Installation ============ $ pip install pyStrich Quick start =========== from pystrich.datamatrix import DataMatrixData, DataMatrixEncoder payload = DataMatrixData("https://github.com/mmulqueen/pyStrich", auto_encoding=True) DataMatrixEncoder(payload).save_svg("datamatrix-example.svg") [image: Data Matrix encoding the pyStrich GitHub URL.][image] A minimal example for each of the other symbologies: from pystrich.code39 import Code39Encoder Code39Encoder("64755").save_svg("code39-example.svg") [image: Code 39 barcode encoding "64755".][image] from pystrich.code128 import Code128Encoder Code128Encoder("WDBCA45D2HA327260").save_svg("code128-example.svg") [image: Code 128 barcode encoding "WDBCA45D2HA327260".][image] from pystrich.ean13 import EAN13Encoder EAN13Encoder("5050070007664").save_svg("ean13-example.svg") [image: EAN-13 barcode encoding "5050070007664".][image] from pystrich.qrcode import QRCodeEncoder QRCodeEncoder("https://github.com/mmulqueen/pyStrich").save_svg("qrcode-example.svg") [image: QR code encoding the pyStrich GitHub URL.][image] For more patterns -- serving barcodes from a web request, generating in bulk, compositing onto a label -- see Recipes. Symbologies =========== * Data Matrix * Code 128 * Code 39 * EAN-13 * QR Code Guides ====== * Command-line interface * Recipes * Printing barcodes Reference ========= * Exceptions * Changelog * Contributors Background ========== pyStrich is a fork of huBarcode, originally developed by HuDoRa from at least 2007. The upstream project has not been active since late 2013. Method B Ltd forked it to provide Python 3 support and to continue development. Thank you to the folks at HuDoRa for doing most of the hard work; the porting was the easy part. Licence ======= If you worry about copyright you might consider this Software BSD-Licensed. If you are still worried, you might consider it GPL1/2/3 compatible. But don't worry. If you need something formal: The code is available under the Apache License, Version 2.0. Boilerplate for Apache License 2.0: Copyright various contributors to huBarcode, later pyStrich. Main contributions are from HuDoRa from at least 2007 to 2013 Contributions since 2015 are from Method B Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Courier Prime (used to generate the glyph outlines embedded in pystrich/_courier_glyphs.py for SVG/EPS labels) is distributed under the SIL Open Font License, Version 1.1. The upstream license text is bundled inline as the OFL_LICENSE constant in pystrich/_courier_glyphs.py and is also available at courier_prime/OFL.txt in the source repository.