Skip to main content

PyStrich is a Python module to generate 1D and 2D barcodes (Code 39, Code 128, DataMatrix, QRCode and EAN13). Forked from huBarcode.

Project description

pyStrich

pyStrich is a Python module to generate 1D and 2D barcodes. Currently it supports

Available from PyPI: https://pypi.python.org/pypi/pyStrich

Build Status

Usage

The interface of the different encoders is fairly straightforward:

from pystrich.datamatrix import DataMatrixEncoder
encoder = DataMatrixEncoder("This is a DataMatrix.")
encoder.save( "sample_barcodes/datamatrix_test.png" )
print(encoder.get_ascii())

Sample of DataMatrix generated by the code above.

Relevant imports are:

from pystrich.code39 import Code39Encoder
from pystrich.code128 import Code128Encoder
from pystrich.datamatrix import DataMatrixEncoder
from pystrich.ean13 import EAN13Encoder
from pystrich.qrcode import QRCodeEncoder

Known Issues

Code39, Code128 and DataMatrix support is considered by the maintainer to be good and they are known to be used in production.

The maintainer rarely uses EAN13 or QRCode support. You may wish to consider more actively maintained modules.

The maintainer has no plans to fix the following issues:

  • Some QR codes cause an exception to be thrown - root cause unknown - see issue 8.
  • DataMatrix module only supports up to 174 characters or 348 digits of data - see issue 2.

Background

pyStrich is a fork of huBarcode module with modifications to support Python 3 (amongst other changes). pyStrich only supports encoding not decoding.

huBarcode was developed by HuDoRa from at least 2007, the project does not seem to have been active since late 2013. Method B Ltd has forked it to provide Python 3 support and facilitate future development. Thank you to the folks at HuDoRa for doing most of the hard work, porting was the easy part.

License

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.

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

pystrich-0.9.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

pystrich-0.9-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file pystrich-0.9.tar.gz.

File metadata

  • Download URL: pystrich-0.9.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pystrich-0.9.tar.gz
Algorithm Hash digest
SHA256 b1f30ecbc35f14dd19b938b25154a22175bc011c49033b963654a70794155095
MD5 f928e863542b3fbfcf1a1035b910a949
BLAKE2b-256 a9e594bb9bfd60d1570d4d7dfcb674ea0ee011eeca14412e5d111787d2aa47c4

See more details on using hashes here.

File details

Details for the file pystrich-0.9-py3-none-any.whl.

File metadata

  • Download URL: pystrich-0.9-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pystrich-0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 a82d0dcdc1b02c1a6126f45b00fa25ec4e94e6c19f45d34d028aa244d48c8375
MD5 2fe42147450c8836075345ec0aaecb00
BLAKE2b-256 e0ebc227adbf42b0891569c9e46686e6ba2d1de180bc16949488215b65875b5b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page