A Python class for EAN and ISBN name lookup and validation using the API on ean-search.org
Project description
EANSearch
A Python class for EAN and ISBN name lookup and validation using the API on https://www.ean-search.org
Compatible with Python 2.x and 3.x
You can install the eansearch module directly with pip:
python -m pip install eansearch
Then use EANSearch in your own scripts like this:
from eansearch import EANSearch
# get a token from https://www.ean-search.org/ean-database-api.html
apiToken = "secret"
ean = "5099750442227" # Thriller
eansearch = EANSearch(apiToken)
name = eansearch.barcodeLookup(ean)
print(ean, " is ", name)
# more detailed result, preferrably in English (1)
product = eansearch.barcodeSearch(ean, 1)
print(ean, " is ", product["name"].encode("utf-8"), " from category ", product["categoryName"], "(Google ID", product["googleCategoryId"], ") issued in", product["issuingCountry"])
isbn = "1119578884"
title = eansearch.isbnLookup(isbn)
print(isbn, " is ", title)
ok = eansearch.verifyChecksum(ean)
print(ean, " is ", "OK" if ok else "Not OK")
# search for product name "iPod", get the first page of the results, only English results
eanList = eansearch.productSearch("iPod")
for product in eanList:
print(product["ean"], " is ", product["name"].encode("utf-8"))
# search for similar product names, get the first page of the results, in any language
eanList = eansearch.similarProductSearch("iPod with extra features", 0, 99)
for product in eanList:
print(product["ean"], " is ", product["name"].encode("utf-8"))
eanList = eansearch.categorySearch(45, "thriller")
for product in eanList:
print(product["ean"], " is ", product["name"].encode("utf-8"))
eanList = eansearch.barcodePrefixSearch("4007249146")
for product in eanList:
print(product["ean"], " is ", product["name"].encode("utf-8"))
country = eansearch.issuingCountryLookup("5099750442227")
print(ean + " was issued in " + country)
barcode = eansearch.barcodeImage("5099750442227", 300, 200)
print("HTML: <img src=\"data:image/png;base64," + " encoded + "\">")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eansearch-1.11.0.tar.gz.
File metadata
- Download URL: eansearch-1.11.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b11f1310ffb13fd3e3745a5c1b06094dd966590657f64b8d8dd010488592f5b5
|
|
| MD5 |
0cda5d7ba0db57965fe039c84038e950
|
|
| BLAKE2b-256 |
2cd01250035fbbe318891707a6b71c1555d1aa2728c8ae0dae48ba49012c4f2b
|
Provenance
The following attestation bundles were made for eansearch-1.11.0.tar.gz:
Publisher:
release.yml on eansearch/python-ean-search
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eansearch-1.11.0.tar.gz -
Subject digest:
b11f1310ffb13fd3e3745a5c1b06094dd966590657f64b8d8dd010488592f5b5 - Sigstore transparency entry: 813695917
- Sigstore integration time:
-
Permalink:
eansearch/python-ean-search@7ac1c41e8f46b744eba257f036c00f86dfe0300f -
Branch / Tag:
refs/tags/v1_11_0 - Owner: https://github.com/eansearch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7ac1c41e8f46b744eba257f036c00f86dfe0300f -
Trigger Event:
push
-
Statement type:
File details
Details for the file eansearch-1.11.0-py3-none-any.whl.
File metadata
- Download URL: eansearch-1.11.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7dc84f8aae9259dd9117bc8b872984840c98f84e4f2e136228c1fa893dd035b
|
|
| MD5 |
3b27bd663ca351c66e99b732641b0503
|
|
| BLAKE2b-256 |
68b7146ff77402daf211a0aea02034ac17379f6adb03e03df1df18e8cb9e54c4
|
Provenance
The following attestation bundles were made for eansearch-1.11.0-py3-none-any.whl:
Publisher:
release.yml on eansearch/python-ean-search
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eansearch-1.11.0-py3-none-any.whl -
Subject digest:
b7dc84f8aae9259dd9117bc8b872984840c98f84e4f2e136228c1fa893dd035b - Sigstore transparency entry: 813695918
- Sigstore integration time:
-
Permalink:
eansearch/python-ean-search@7ac1c41e8f46b744eba257f036c00f86dfe0300f -
Branch / Tag:
refs/tags/v1_11_0 - Owner: https://github.com/eansearch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7ac1c41e8f46b744eba257f036c00f86dfe0300f -
Trigger Event:
push
-
Statement type: