{"id":26801,"library":"biip","title":"biip","description":"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.","status":"active","version":"5.0.0","language":"python","source_language":"en","source_url":"https://github.com/jodal/biip","tags":["barcode","gs1","gtin","ean","upc"],"install":[{"cmd":"pip install biip","lang":"bash","label":"Install biip"}],"dependencies":[{"reason":"Provides the Result type used for parsing return values.","package":"result","optional":false}],"imports":[{"note":"","wrong":"","symbol":"parse","correct":"from biip import parse"},{"note":"","wrong":"","symbol":"ParseError","correct":"from biip import ParseError"},{"note":"Gtin is in the gtin submodule, not top-level","wrong":"from biip import Gtin","symbol":"Gtin","correct":"from biip.gtin import Gtin"},{"note":"Gs1Message is in the gs1 submodule","wrong":"from biip import Gs1Message","symbol":"Gs1Message","correct":"from biip.gs1 import Gs1Message"}],"quickstart":{"code":"from biip import parse\nfrom biip.gs1 import Gs1Message\n\n# Parse a GTIN barcode\nresult = parse(\"04012345123455\")\nprint(result.gtin)  # Gtin(...)\n\n# Parse a GS1 Application Identifier string\nmessage = Gs1Message.parse(\"(01)04012345123455(17)250101\")\nprint(message.gtin)  # Gtin(...)\nprint(message.expiration_date)  # datetime.date(2025, 1, 1)\n","lang":"python","description":"Parse a GTIN barcode and a GS1 message with expiry date."},"warnings":[{"fix":"Update code to handle GS18Prefix accordingly; see upgrade guide.","message":"In biip 5.0, Gtin.prefix for GTIN-8 is of type GS18Prefix, not the old type. Accessing prefix attributes may break.","severity":"breaking","affected_versions":"5.0.0 and later"},{"fix":"Treat result objects as immutable; use new instances with modifications.","message":"In biip 4.0, result objects are now immutable. Trying to set attributes on parse results will raise TypeError.","severity":"breaking","affected_versions":"4.0.0 and later"},{"fix":"Check return value for None instead of catching ParseError.","message":"In biip 4.0, biip.parse() no longer raises ParseError when all parsers fail; it raises a different exception or returns None.","severity":"breaking","affected_versions":"4.0.0 and later"},{"fix":"Use 'from biip.gs1_digital_link import ...' instead of 'from biip.gs1_web_uri import ...'.","message":"The old 'gs1_web_uri' module and classes were renamed to 'gs1_digital_link' in 5.0. Old imports will break.","severity":"deprecated","affected_versions":"5.0.0 and later"},{"fix":"Ensure your code does not reject redundant separators if that was previous behavior.","message":"GS1 message separator char (FNC1) may appear redundantly; biip now ignores multiple separators. Your validation logic may need updating.","severity":"gotcha","affected_versions":"3.4.0 and later"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from biip.gtin import Gtin'","cause":"Gtin is not exported from the top-level package; it's in biip.gtin.","error":"ImportError: cannot import name 'Gtin' from 'biip'"},{"fix":"Check if result.gtin is not None before using it.","cause":"The parse result does not always contain a gtin; it returns None for non-GTIN barcodes.","error":"AttributeError: 'ParseResult' object has no attribute 'gtin'"},{"fix":"Do not modify Gtin objects; create new ones if needed.","cause":"In biip 4.0+, Gtin and other result objects are immutable.","error":"TypeError: 'Gtin' object does not support item assignment"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}