eansearch-1.5.0
توضیحات
A Python class for EAN and ISBN name lookup and validation using the API on ean-search.org
| ویژگی | مقدار |
|---|---|
| سیستم عامل | Unix |
| نام فایل | eansearch-1.5.0 |
| نام | eansearch |
| نسخه کتابخانه | 1.5.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Jan Willamowius |
| ایمیل نویسنده | info@relaxedcommunications.com |
| آدرس صفحه اصلی | https://github.com/eansearch/python-ean-search |
| آدرس اینترنتی | https://pypi.org/project/eansearch/ |
| مجوز | - |
# 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
```python
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"])
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.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"))
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=2.0 | Python |
نحوه نصب
نصب پکیج whl eansearch-1.5.0:
pip install eansearch-1.5.0.whl
نصب پکیج tar.gz eansearch-1.5.0:
pip install eansearch-1.5.0.tar.gz