Registry / serialization / barcodenumber

barcodenumber

JSON →
library0.5.0pypypi✓ verified 85d ago

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.

pip install barcodenumber
INSTALL
IMPORT
SIG · BARCODENUMBER
B
barcodenumber
serializationpythonv0.5.0
Install
1.8s avg
Import
146ms
Disk
22MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.155s · 23.9MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.8s · import 0.136s · 24MB
22MB installed
● package 22MB
Code
Verified usage

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

barcodenumber
import barcodenumber
from barcodenumber import EAN13
The primary functions are exposed directly under the 'barcodenumber' module, e.g., barcodenumber.check_code(). Individual barcode types are passed as strings to these functions, not imported as classes.

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}")
Debug
Known issues
breakingThe `barcodenumber` library was last updated in November 2019 and officially supports Python up to 3.6. It is likely incompatible with newer Python versions (3.7+) and may cause `ImportError` or other runtime issues.
fix
Use a Python environment with version 3.6 or older, or consider alternative, more actively maintained libraries for barcode validation or generation (e.g., `python-barcode` for generation if that's the intent).
affects: 0.5.0 (Python 3.7+)
gotchaThis library is strictly for *validating* existing barcode numbers, not *generating* new barcodes or images. Attempting to use it for barcode generation will lead to frustration, as it lacks such functionality.
fix
If barcode generation is required, use a dedicated library like `python-barcode` (pypi.org/project/python-barcode/) or `pybarcodes` (pypi.org/project/pybarcodes/).
affects: All versions
deprecatedThe library shows no signs of active maintenance since its last release in November 2019. This means it may not receive updates for new barcode standards, critical bug fixes, or security patches, and could become increasingly incompatible with modern Python ecosystems.
fix
Evaluate if the specific validation needs are fully met by this version and if the risks of using an unmaintained library are acceptable. For long-term projects or those requiring robust support, seek actively maintained alternatives for barcode validation.
affects: 0.5.0
Errors
Common errors & fixes
TypeError: 'module' object is not callable (or similar related to directly calling barcode types)
Trying to import or call barcode types (e.g., EAN13) as classes directly from the `barcodenumber` module, instead of passing the type as a string to the `check_code` function.
fix
Instead of `from barcodenumber import EAN13` or `EAN13('...')`, use `import barcodenumber` and then `barcodenumber.check_code('ean13', '...')`.
ImportError: cannot import name '...' from 'barcodenumber' (or ModuleNotFoundError: No module named 'barcodenumber')
Attempting to run `barcodenumber` on Python versions 3.7+ for which it was not tested or developed. The library targets Python 2.7 and 3.3-3.6.
fix
Ensure your Python environment is version 3.6 or older. If using a newer Python version, consider migrating to a different, actively maintained barcode library. Confirm `pip install barcodenumber` ran successfully.
False positives/negatives for barcode validation
Barcode number provided does not match the expected length or format for the specified type (e.g., providing a 12-digit number for EAN13 without the checksum, or an incorrect check digit).
fix
Double-check the barcode number and the specified barcode type (e.g., 'ean13', 'isbn10', 'upc'). Ensure the input string contains the correct number of digits, including the check digit. Consult GS1 standards for specific barcode format requirements.
Upgrade
Version history
0.5.0latest on PyPI · released Nov 6, 2019
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
barcodenumber — pip install barcodenumber · libregistry