Skip to main content

Biip interprets the data in barcodes.

Project description

📦 Biip

Biip interprets the data in barcodes.

Tests Docs Coverage PyPI


Biip is a Python library for making sense of the data in barcodes.

The library can interpret the following formats:

  • GTIN-8, GTIN-12, GTIN-13, and GTIN-14 numbers, commonly found in EAN-8, EAN-13, UPC-A, UPC-E, and ITF-14 barcodes.

  • GS1 AI element strings, commonly found in GS1-128 barcodes.

For a quickstart guide and a complete API reference, see the documentation.

Installation

Biip requires Python 3.7 or newer.

Biip is available from PyPI:

python3 -m pip install biip

Optionally, with the help of py-moneyed, Biip can convert amounts with currency information to moneyed.Money objects. To install Biip with py-moneyed, run:

python3 -m pip install "biip[money]"

Development status

All planned features have been implemented. When the library has seen some extended production usage, we should be ready to make a 1.0 release.

Please open an issue if you have and barcode parsing related needs that are not covered.

Features

  • GS1 (multiple Element Strings with Application Identifiers)
    • <input type="checkbox" checked="" disabled="" /> Recognize all specified Application Identifiers.
    • <input type="checkbox" checked="" disabled="" /> Recognize allocating GS1 Member Organization from the GS1 Company Prefix.
    • <input type="checkbox" checked="" disabled="" /> Parse fixed-length Element Strings.
    • <input type="checkbox" checked="" disabled="" /> Parse variable-length Element Strings.
      • <input type="checkbox" checked="" disabled="" /> Support configuring the separation character.
    • <input type="checkbox" checked="" disabled="" /> Parse AI 00 as SSCC.
    • <input type="checkbox" checked="" disabled="" /> Parse AI 01 and 02 as GTIN.
    • <input type="checkbox" checked="" disabled="" /> Parse dates into datetime.date values.
      • <input type="checkbox" checked="" disabled="" /> Interpret the year to be within -49/+50 years from today.
      • <input type="checkbox" checked="" disabled="" /> Interpret dates with day "00" as the last day of the month.
    • <input type="checkbox" checked="" disabled="" /> Parse variable measurement fields into Decimal values.
    • <input type="checkbox" checked="" disabled="" /> Parse discount percentage into Decimal values.
    • <input type="checkbox" checked="" disabled="" /> Parse amounts into Decimal values.
      • <input type="checkbox" checked="" disabled="" /> Additionally, if py-moneyed is installed, parse amounts with currency into Money values.
    • <input type="checkbox" checked="" disabled="" /> Encode as Human Readable Interpretation (HRI), e.g. with parenthesis around the AI numbers.
    • <input type="checkbox" checked="" disabled="" /> Easy lookup of parsed Element Strings by:
      • <input type="checkbox" checked="" disabled="" /> Application Identifier (AI) prefix
      • <input type="checkbox" checked="" disabled="" /> Part of AI's data title
  • GTIN (Global Trade Item Number)
    • <input type="checkbox" checked="" disabled="" /> Parse GTIN-8, e.g. from EAN-8 barcodes.
    • <input type="checkbox" checked="" disabled="" /> Parse GTIN-12, e.g. from UPC-A and UPC-E barcodes.
    • <input type="checkbox" checked="" disabled="" /> Parse GTIN-13, e.g. from EAN-13 barcodes.
    • <input type="checkbox" checked="" disabled="" /> Parse GTIN-14, e.g. from ITF-14 and GS1-128 barcodes.
    • <input type="checkbox" checked="" disabled="" /> Extract and validate check digit.
    • <input type="checkbox" checked="" disabled="" /> Extract GS1 Prefix.
    • <input type="checkbox" checked="" disabled="" /> Extract packaging level digit from GTIN-14.
    • <input type="checkbox" checked="" disabled="" /> Encode GTIN-8 as GTIN-12/13/14.
    • <input type="checkbox" checked="" disabled="" /> Encode GTIN-12 as GTIN-13/14.
    • <input type="checkbox" checked="" disabled="" /> Encode GTIN-13 as GTIN-14.
  • RCN (Restricted Circulation Numbers), a subset of GTINs
    • <input type="checkbox" checked="" disabled="" /> Classification of RCN usage to either a geographical region or a company.
    • <input type="checkbox" checked="" disabled="" /> Parsing of variable measurements (price/weight) into Decimal values.
    • <input type="checkbox" checked="" disabled="" /> Parsing of price values into Money values if py-moneyed is installed and the region's RCN parsing rules specifies a currency.
    • <input type="checkbox" checked="" disabled="" /> Baltics: Parsing of weight.
    • <input type="checkbox" checked="" disabled="" /> Great Britain: Parsing of price, including validation of price check digit.
    • <input type="checkbox" checked="" disabled="" /> Norway: Parsing of weight and price.
    • <input type="checkbox" checked="" disabled="" /> Sweden: Parsing of weight and price.
    • <input type="checkbox" checked="" disabled="" /> Encode RCN with the variable measure part zeroed out, to help looking up the correct trade item.
  • SSCC (Serial Shipping Container Code)
    • <input type="checkbox" checked="" disabled="" /> Validate check digit.
    • <input type="checkbox" checked="" disabled="" /> Encode for human consumption, with the logical groups separated by whitespace.
  • Symbology Identifers, e.g. ]EO
    • <input type="checkbox" checked="" disabled="" /> Recognize all specified Symbology Identifier code characters.
    • <input type="checkbox" checked="" disabled="" /> Strip Symbology Identifers before parsing the remainder.
    • <input type="checkbox" checked="" disabled="" /> Use Symbology Identifers when automatically selecting what parser to use.

License

Biip is copyright 2020 Stein Magnus Jodal and contributors. Biip is licensed 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.

Files for biip, version 0.5.2
Filename, size File type Python version Upload date Hashes
Filename, size biip-0.5.2-py3-none-any.whl (39.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size biip-0.5.2.tar.gz (34.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page