Registry / serialization / biip
library5.0.0pypypi✓ verified 84d ago

Biip interprets the data in barcodes. It parses GS1 barcodes (GTIN, GLN, SSCC, etc.), GS1 Application Identifiers, and GS1 Digital Link URIs. Current version 5.0.0, requires Python >=3.10. Active development, releases a few times per year.

pip install biip
INSTALL
IMPORT
SIG · BIIP
B
biip
serializationpythonv5.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parse
from biip import parse
ParseError
from biip import ParseError
Gtin
from biip.gtin import Gtin
from biip import Gtin
Gtin is in the gtin submodule, not top-level
Gs1Message
from biip.gs1 import Gs1Message
from biip import Gs1Message
Gs1Message is in the gs1 submodule

Parse a GTIN barcode and a GS1 message with expiry date.

from biip import parse from biip.gs1 import Gs1Message # Parse a GTIN barcode result = parse("04012345123455") print(result.gtin) # Gtin(...) # Parse a GS1 Application Identifier string message = Gs1Message.parse("(01)04012345123455(17)250101") print(message.gtin) # Gtin(...) print(message.expiration_date) # datetime.date(2025, 1, 1)
Debug
Known issues
breakingIn biip 5.0, Gtin.prefix for GTIN-8 is of type GS18Prefix, not the old type. Accessing prefix attributes may break.
fix
Update code to handle GS18Prefix accordingly; see upgrade guide.
affects: 5.0.0 and later
breakingIn biip 4.0, result objects are now immutable. Trying to set attributes on parse results will raise TypeError.
fix
Treat result objects as immutable; use new instances with modifications.
affects: 4.0.0 and later
breakingIn biip 4.0, biip.parse() no longer raises ParseError when all parsers fail; it raises a different exception or returns None.
fix
Check return value for None instead of catching ParseError.
affects: 4.0.0 and later
deprecatedThe old 'gs1_web_uri' module and classes were renamed to 'gs1_digital_link' in 5.0. Old imports will break.
fix
Use 'from biip.gs1_digital_link import ...' instead of 'from biip.gs1_web_uri import ...'.
affects: 5.0.0 and later
gotchaGS1 message separator char (FNC1) may appear redundantly; biip now ignores multiple separators. Your validation logic may need updating.
fix
Ensure your code does not reject redundant separators if that was previous behavior.
affects: 3.4.0 and later
Errors
Common errors & fixes
ImportError: cannot import name 'Gtin' from 'biip'
Gtin is not exported from the top-level package; it's in biip.gtin.
fix
Use 'from biip.gtin import Gtin'
AttributeError: 'ParseResult' object has no attribute 'gtin'
The parse result does not always contain a gtin; it returns None for non-GTIN barcodes.
fix
Check if result.gtin is not None before using it.
TypeError: 'Gtin' object does not support item assignment
In biip 4.0+, Gtin and other result objects are immutable.
fix
Do not modify Gtin objects; create new ones if needed.
Upgrade
Version history
5.0.0latest on PyPI · released Oct 12, 2025
Audit
Dependencies
resultrequiredProvides the Result type used for parsing return values.
Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
biip — pip install biip · libregistry