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
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"], " 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")
eanList = eansearch.productSearch('iPod')
for product in eanList:
print(product["ean"], " is ", product["name"].encode("utf-8"))
eanList = eansearch.similarProductSearch('iPod with extra features')
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")
print("Barcode image for " + ean + " (base64 encoded): " + barcode)
#import base64
#print (base64.b64decode(barcode))
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
File details
Details for the file eansearch-1.8.3.tar.gz
.
File metadata
- Download URL: eansearch-1.8.3.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4240556d4e1071f3f6d0e9bc07a8312ed13a05b3ddd532d28cafc16d0a67b63a
|
|
MD5 |
ecdd319459fefdd4874dd978c7164bfd
|
|
BLAKE2b-256 |
8e289d0f39e1f6d721a5c1e4ada003c897777e57d9270508a9c2c5f4669bdef1
|
Provenance
The following attestation bundles were made for eansearch-1.8.3.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.8.3.tar.gz
-
Subject digest:
4240556d4e1071f3f6d0e9bc07a8312ed13a05b3ddd532d28cafc16d0a67b63a
- Sigstore transparency entry: 160346575
- Sigstore integration time:
-
Permalink:
eansearch/python-ean-search@b127d65c4c79694a4670d3db1fa633f4cc89ecc2
-
Branch / Tag:
refs/tags/v1_8_3
- Owner: https://github.com/eansearch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
release.yml@b127d65c4c79694a4670d3db1fa633f4cc89ecc2
-
Trigger Event:
push
-
Statement type:
File details
Details for the file eansearch-1.8.3-py3-none-any.whl
.
File metadata
- Download URL: eansearch-1.8.3-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
cac2b5b77a55692033468be548e3585b1afc5a899f1fd07be93154c4bf660ee1
|
|
MD5 |
4abaebf18debe29636c529bdd7b60f09
|
|
BLAKE2b-256 |
e5d424f3459196ffc09e7f32245cff7971848be79c4a3db5f800578294946f50
|
Provenance
The following attestation bundles were made for eansearch-1.8.3-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.8.3-py3-none-any.whl
-
Subject digest:
cac2b5b77a55692033468be548e3585b1afc5a899f1fd07be93154c4bf660ee1
- Sigstore transparency entry: 160346576
- Sigstore integration time:
-
Permalink:
eansearch/python-ean-search@b127d65c4c79694a4670d3db1fa633f4cc89ecc2
-
Branch / Tag:
refs/tags/v1_8_3
- Owner: https://github.com/eansearch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
release.yml@b127d65c4c79694a4670d3db1fa633f4cc89ecc2
-
Trigger Event:
push
-
Statement type: