Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: jodal/biip

v5.0.0

12 Oct 20:39
966255e

Choose a tag to compare

This release contains a couple of breaking changes, thus the version bump to 5.0. See the upgrade guide for the full details and steps for quickly updating your code to work with Biip 5.0.

Breaking changes

  • Gtin.prefix for GTIN-8 is of a new GS18Prefix type (PR: #403)
  • The "GS1 Web URIs" classes and methods added in 4.0 have all been renamed to stay in sync with the specification which has rebranded to "GS1 Digital Link URIs". (PR: #396)
  • GS1 Application Identifier aliases in GS1 Digital Link URIs are no longer supported, as recommended by the specification. (PR: #396)

See the upgrade guide for full details.

Changes

  • A new attribute Gtin.item_references has been added to the Gtin class. It is set for GTIN-8/12/13/14, as well as company-wide RCNs and geographical RCNs where the regional RCN rules describe what part of the payload is an item reference. (Fixes: #401, PR: #406, #408)

Fixes

  • Add support for GS1-8 Prefixes. Gtin.prefix is now a new type GS18Prefix for GTIN-8s, and correctly maps GTIN-8 prefixes to the right GS1 organizations. Together with this fix, Gtin.company_prefix is no longer wrongly set for GTIN-8. (Fixes: #398, PR: #403)

Updates

  • Update GS1 Prefix database. No changes.
  • Update GS1 Company Prefix database.
  • Update GS1 Application Identifier database. No changes.

v4.0.0

07 Apr 20:54
d488b00

Choose a tag to compare

This release contains a number of breaking changes, thus the version bump to 4.0. See the upgrade guide for the full details and steps for quickly updating your code to work with Biip 4.0.

Breaking changes

  • Result objects are now immutable. (PR: #393)
  • biip.parse() no longer raises ParseError when all parsers fail. (PR: #376)
  • All configuration options must be passed via the new ParseConfig class. (PR: #385)
  • Several classes and fields in the low-level API have been moved or renamed. (PR: #375, #379, #380, #381, #382, #391, #392)
  • Python 3.9 is no longer supported. (PR: #383)

See the upgrade guide for full details.

Support for GS1 Web URIs

Biip can now work with GS1 Web URIs. (Fixes: #83, PR: #387)

All GS1 Application Identifiers are supported:

>>> import biip
>>> result = biip.parse("https://www.example.com/products/gtin/07032069804988?10=0329&15=210526")
>>> result.gs1_web_uri.as_canonical_uri()
'https://id.gs1.org/01/07032069804988/10/0329?15=210526'

Conversion back and forth between GS1 Web URIs and GS1 Messages are fully supported:

>>> message = result.gs1_web_uri.as_gs1_message()
>>> message.as_hri()
'(01)07032069804988(10)0329(15)210526'
>>> web_uri = message.as_gs1_web_uri()
>>> web_uri.as_uri(domain="example.com", prefix="products")
'https://example.com/products/01/07032069804988/10/0329?15=210526'

See the GS1 Web URIs section in the quickstart guide for an introduction.

Date validation in GS1 element strings can now be disabled

It is now possible to disable validation of the dates in GS1 element strings with the gs1_element_strings_verify_date option. When validation is disabled, invalid date values are still available as text in the GS1ElementString.value field, but the GS1ElementString.date field is None. (Fixes: #247, PR: 386, #389)

Revamped documentation

This release comes with revamped documentation, where all parts of the documentation has been reviewed and polished. Also, the documentation system has been switched from Sphinx to MkDocs.

Support for pretty-printing with Rich

All objects returned from Biip now supports the Rich pretty-printing protocol, making them a lot nicer to work with in the terminal. Biip does not depend on Rich, so you have to install it yourself, and then use Rich's print function to print Biip objects.

>>> from rich import print
>>> import biip
>>> print(biip.parse("7032069804988"))

Fixes

  • Correctly attribute GTIN-8 prefixes assigned to GS1 UK and GS1 Poland. (Fixes: #162, PR: #384)
  • Update GS1 Prefix database. (PR: #382)
  • Update GS1 Company Prefix database. (PR: #382)
  • Update GS1 Application Identifier database. (PR: #382)

v3.6.0

17 Feb 07:41
f052ece

Choose a tag to compare

This release has no changes for users, only for distribution packagers.

Changes

  • Switched build backend from poetry to hatchling.
  • Development is now done using uv and tox-uv.
  • Replaced darglint docs linter with Ruff's pydoclint rules.
  • Bumped some dev tooling versions.

v3.5.2

24 Nov 14:04

Choose a tag to compare

Fixes

  • Fix error in AI 703x patterns. The root cause is an error in the data imported from gs1.org, which we now patch. (Fixes: #345, PR: #346)

If you're using Biip, please add yourself to the list of users!

v3.5.1

19 Nov 23:23

Choose a tag to compare

Changes

  • Use Trusted Publishing when releasing to PyPI.

If you're using Biip, please add yourself to the list of users!

v3.5.0

03 Oct 18:27

Choose a tag to compare

Breaking changes

  • Drop support for Python 3.8 (PR: #326)

Changes

  • Use importlib.resources to load bundled data files so that Biip can be installed as a zip file. (PR: #324, #327)
  • Update all bundled GS1 datasets. The GS1 Company prefixes is the only dataset with any changes.
  • Test on Python 3.13

If you're using Biip, please add yourself to the list of users!

v3.4.0

03 Aug 19:57
v3.4.0

Choose a tag to compare

Changes

  • Accept redundant GS1 Message separator chars, both after fixed-length fields and at the end of the GS1 Message. The specification says that the separator characters "should not" be present in these locations, but doesn't forbid it. Multiple separator characters are also ignored. (Fixes: #176, PR: #304)

If you're using Biip, please add yourself to the list of users!

v3.3.0

29 Jul 16:41
v3.3.0

Choose a tag to compare

Changes

  • Add support for extracting dates and potentially datetimes from GS1 messages with AI 4324/4325/4326/7003/7006/7007/7011/8008. (PR: #301)

Fixes

  • In the new GS1 AI dataset introduced in Biip 3.2.0, there are four AIs with optional pattern groups. When the value matches everything but the optional pattern group, the group's value becomes None. This caused Biip to crash when we tried building a string of the characters matching the pattern. (Fixes: #295, PR: #300)

If you're using Biip, please add yourself to the list of users!

v3.2.0

30 Jun 10:38
v3.2.0

Choose a tag to compare

Changes

  • Update all bundled GS1 datasets (PR: #292)
    • GS1 Application Identifiers including many stricter regexp patterns
    • GS1 Member Organization prefixes
    • GS1 Company prefixes

Development environment

  • Replace Black with ruff. (PR: #239)

If you're using Biip, please add yourself to the list of users!

v3.1.0

09 Oct 08:48
v3.1.0

Choose a tag to compare

Breaking changes

  • Drop support for Python 3.7, as it reached end-of-life this summer. (#207)

Changes

  • Add Python 3.12 to the test matrix. (#232)

Development environment

  • Type check with pyright in addition to mypy, and fix all typing issues indicated by pyright. (#186)
  • Replace flake8 and all flake8 plugins with ruff. (#184)

If you're using Biip, please add yourself to the list of users!