Skip to content

Releases: mmulqueen/pyStrich

0.14

18 May 18:24

Choose a tag to compare

PDF417 and Aztec code support

0.13

14 May 13:20

Choose a tag to compare

  • QR Code: accepts any Unicode string and picks the best encoding
    automatically (ASCII, Latin-1 or UTF-8). New
    :class:~pystrich.qrcode.QRCodeData exposes explicit charset control
    when you need it.
  • QR Code: internal refactor to improve the encoder's spec compliance
    and to share Reed-Solomon and encoding-selection code with
    the Data Matrix module.
  • Data Matrix: TextEncoder.encode() returns list[int] instead of
    a str of chr()-packed bytes.
  • Data Matrix: support all 24 ECC200 square symbol sizes up to 144x144
    (1558 data codewords), with interleaved Reed-Solomon blocks for the
    larger symbols. Previously capped at 48x48 (174 codewords).
  • Data Matrix: fix the bottom-right corner-module pattern for sizes
    where it was previously emitted as four zero cells, and fix
    pad-codeword randomisation to produce the correct value at the
    position-28 boundary.
  • Code 128: unencodable characters now raise
    :class:~pystrich.exceptions.PyStrichInvalidInput instead of being
    logged and failing later with KeyError.
  • Code 39: non-ASCII input under full_ascii=True now raises
    :class:~pystrich.exceptions.PyStrichInvalidInput instead of an
    unwrapped UnicodeEncodeError.
  • Typing: the entire pystrich package is now checked with mypy;
    the remaining per-module ignore_errors overrides have been removed.

0.12

08 May 23:42

Choose a tag to compare

  • New pystrich console script with a subcommand per format and PNG / SVG / EPS / ASCII / terminal / DXF output. See Command-line interface.
  • Data Matrix: DataMatrixData now expects either an encoding= argument or auto_encoding=True to be set on construction. The new auto_encoding=True flag picks the narrowest encoding.
  • SVG output for QR Code and Data Matrix via new save_svg / get_svg methods on QRCodeEncoder and DataMatrixEncoder.
  • SVG output for the 1D barcodes via the same save_svg / get_svg methods on Code39Encoder, Code128Encoder and EAN13Encoder.
  • EPS output for QR Code and Data Matrix via new save_eps / get_eps methods on the same classes.
  • EPS output for the 1D barcodes via the same save_eps / get_eps methods on Code39Encoder, Code128Encoder and EAN13Encoder.
  • The human-readable labels for 1D barcodes are rendered with bundled Courier Prime glyph outlines (SIL Open Font License).
  • DXF: get_dxf() on QRCodeEncoder and DataMatrixEncoder now writes the correct $INSUNITS value for "in", "ft", "mi", "cm" and "m" (previously any value other than "mm" was silently treated as unspecified); you should now pass units=None if unspecified is desired.
  • All vector outputs accept a mark_shape keyword argument (MarkShape) selecting how matched cells are grouped and drawn: horizontal runs (the SVG / EPS default), one square mark per cell (the DXF default), or one filled circle per cell.
  • Tests: round-trip DXF coverage for QR Code and Data Matrix – the rendered DXF is read with ezdxf, rasterised, and decoded back to the original string.
  • New get_terminal_art method on QRCodeEncoder and DataMatrixEncoder, rendering the symbol with Unicode half-block characters so it scans on screen. ANSI background/foreground codes are applied by default for readability on any terminal theme; pass ansi_bg=False for plain output.

0.11

07 May 07:30

Choose a tag to compare

  • Documentation: full Sphinx-built docs are now published at https://www.method-b.uk/pyStrich/docs/, covering each symbology, recipes and printing guidance, exception hierarchy and a reference index.
  • DataMatrix: add explicit "iso-8859-1" and "utf-8" encodings for non-ASCII payloads, selectable via DataMatrixData.
  • DataMatrix: saner handling of non-ASCII input under the legacy "compat" encoding, with deprecation in favour of explicit encodings.
  • DataMatrix: proper FNC1 support via the FNC1 marker constant. The long-accepted chr(231) workaround for GS1 still works behind a Fnc1WorkaroundCompatWarning (see issue #13).
  • QR Code: fix issue #8; certain valid strings could not generate a QR code.
  • EAN-13 quiet zone is now 11 modules left, 7 modules right (per the GS1 General Specifications); previously 9 modules each side, which was below spec on the left.
  • EAN-13: the leading digit’s vertical position is now configurable via an options dict (first_digit_y_offset); pass 0 for a level baseline across all three digit groups (issue #18). The default preserves the classic look where the first digit is slightly higher.
  • Errors: unified exception hierarchy. All pyStrich-raised errors now inherit from PyStrichError.
  • Public get_pilimage method on every encoder, returning a PIL.Image.Image directly.
  • Typing: encoders and renderers now have type hints and are checked with mypy.
  • Tests: refactored test suite to make better use of pytest, and extended encode/decode round-trip test coverage to Code 39, Code 128, EAN-13 and QR Code (previously DataMatrix only).
  • Confirmed compatibility with newer Pillow versions and Python 3.13.
  • Drop support for Python 3.8 and 3.9. Supported versions are now Python 3.10 to 3.14.

v0.10

24 Sep 12:12

Choose a tag to compare

Make quiet zone configurable fof DataMatrix (#17). Confirm Python 3.13 compatibility.

Modernise

02 Oct 15:29

Choose a tag to compare

Update for modern version of Python and Pillow.

0.7

26 Jul 16:42

Choose a tag to compare

0.7

Allows larger data matrices.

This time with fonts and data.

21 Jul 17:55

Choose a tag to compare

0.6

Remove test relying on dmtxwrite due to issues in last commit.

First working version on PyPI

19 Jul 21:37

Choose a tag to compare

0.4

Fixed setup.py so PyPI package isn't broken.