barcodenumber

0.5.0 · maintenance · verified Thu Apr 16

barcodenumber is a Python module, version 0.5.0, designed to validate various product codes such as EAN, EAN13, ISBN, ISBN10, and ISBN13. It offers a straightforward way to check the authenticity and correct format of barcode numbers, primarily using checksum algorithms. The library was last updated in November 2019 and supports Python 2.7 and Python 3.3-3.6. It is not actively maintained for newer Python versions or for barcode generation.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import the library, validate an EAN13 and ISBN10 code using `check_code()`, and list all supported barcode types with `barcodes()`.

import barcodenumber

# Validate an EAN13 barcode
is_valid_ean13 = barcodenumber.check_code('ean13', '9788478290222')
print(f"EAN13 '9788478290222' is valid: {is_valid_ean13}")

# Validate an ISBN10 barcode
is_valid_isbn10 = barcodenumber.check_code('isbn10', '0321765726')
print(f"ISBN10 '0321765726' is valid: {is_valid_isbn10}")

# List all supported barcode types
supported_types = barcodenumber.barcodes()
print(f"Supported barcode types: {supported_types}")

view raw JSON →