# ean-tools
Collection of tools for validating and getting information about EAN (UPC, GTIN) and ISBN barcodes.
## Installation
```commandline
pip install affix-tree
```
## Usage
### Barcode normalization
```pycon
>>> from ean_tools.normalization import normalize_barcode
>>> normalize_barcode('978-84865-4608-3')
'9788486546083'
```
### Check digit validation
```pycon
>>> from ean_tools.check_digits import has_correct_check_digit
>>> has_correct_check_digit('8510000076279')
False
```
### Getting additional barcode information
```pycon
>>> from ean_tools.barcode_info import get_barcode_info, BarcodeType
>>> get_barcode_info('4000000001140')
BarcodeInfo(barcode_type=BarcodeType.REGULAR, description='GS1 Germany', country='de')
```
Raw data
{
"_id": null,
"home_page": "https://github.com/ean-db/ean-tools",
"name": "ean-tools",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "barcode, ean, upc, isbn, gtin",
"author": "EAN-DB",
"author_email": "support@ean-db.com",
"download_url": "https://files.pythonhosted.org/packages/df/a9/3cd2e73fec23f06f2b3fb443d306b412b01197f5de7c3efaf827c794aec2/ean_tools-0.1.0.tar.gz",
"platform": null,
"description": "# ean-tools\n\nCollection of tools for validating and getting information about EAN (UPC, GTIN) and ISBN barcodes.\n\n## Installation\n\n```commandline\npip install affix-tree\n```\n\n## Usage\n\n### Barcode normalization\n\n```pycon\n>>> from ean_tools.normalization import normalize_barcode\n\n>>> normalize_barcode('978-84865-4608-3')\n\n'9788486546083'\n```\n\n### Check digit validation\n\n```pycon\n>>> from ean_tools.check_digits import has_correct_check_digit\n\n>>> has_correct_check_digit('8510000076279')\n\nFalse\n```\n\n### Getting additional barcode information\n\n```pycon\n>>> from ean_tools.barcode_info import get_barcode_info, BarcodeType\n\n>>> get_barcode_info('4000000001140')\n\nBarcodeInfo(barcode_type=BarcodeType.REGULAR, description='GS1 Germany', country='de')\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Collection of tools for validating and getting information about EAN (UPC, GTIN) and ISBN barcodes.",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/ean-db/ean-tools",
"Repository": "https://github.com/ean-db/ean-tools"
},
"split_keywords": [
"barcode",
" ean",
" upc",
" isbn",
" gtin"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0d1fa664a4de43cc8745b87e456ba34a5b4c70ca477bf197a9471dafc88a6658",
"md5": "9752af666d9d7e227d188e5501c6bc8c",
"sha256": "ac1adb04393d481bec322425867ed70a6095a6e7e9727c26d58b4b5eebccd313"
},
"downloads": -1,
"filename": "ean_tools-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9752af666d9d7e227d188e5501c6bc8c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 9995,
"upload_time": "2025-02-15T17:36:50",
"upload_time_iso_8601": "2025-02-15T17:36:50.124027Z",
"url": "https://files.pythonhosted.org/packages/0d/1f/a664a4de43cc8745b87e456ba34a5b4c70ca477bf197a9471dafc88a6658/ean_tools-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dfa93cd2e73fec23f06f2b3fb443d306b412b01197f5de7c3efaf827c794aec2",
"md5": "fc19ea557ce990c7f9d4bc1d5bd51ce6",
"sha256": "91ba35165449e911d8425acd01d84386f505c099ca02c008c26c01bdbcfa7577"
},
"downloads": -1,
"filename": "ean_tools-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "fc19ea557ce990c7f9d4bc1d5bd51ce6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 7718,
"upload_time": "2025-02-15T17:36:54",
"upload_time_iso_8601": "2025-02-15T17:36:54.184475Z",
"url": "https://files.pythonhosted.org/packages/df/a9/3cd2e73fec23f06f2b3fb443d306b412b01197f5de7c3efaf827c794aec2/ean_tools-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-15 17:36:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ean-db",
"github_project": "ean-tools",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ean-tools"
}