eansearch


Nameeansearch JSON
Version 1.8.3 PyPI version JSON
download
home_pagehttps://github.com/eansearch/python-ean-search
SummaryA Python class for EAN and ISBN name lookup and validation using the API on ean-search.org
upload_time2025-01-07 15:26:47
maintainerNone
docs_urlNone
authorJan Willamowius
requires_python>=2.0
licenseNone
keywords barcode barcodes ean ean13 ean-13 upc gtin isbn13 isbn-13 search lookup find valid validation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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"])

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))


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/eansearch/python-ean-search",
    "name": "eansearch",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=2.0",
    "maintainer_email": null,
    "keywords": "barcode barcodes ean ean13 ean-13 upc gtin isbn13 isbn-13 search lookup find valid validation",
    "author": "Jan Willamowius",
    "author_email": "info@relaxedcommunications.com",
    "download_url": "https://files.pythonhosted.org/packages/8e/28/9d0f39e1f6d721a5c1e4ada003c897777e57d9270508a9c2c5f4669bdef1/eansearch-1.8.3.tar.gz",
    "platform": null,
    "description": "# EANSearch\n\nA Python class for EAN and ISBN name lookup and validation using the API on https://www.ean-search.org\n\nCompatible with Python 2.x **and** 3.x\n\n```python\nfrom eansearch import EANSearch\n\n# get a token from https://www.ean-search.org/ean-database-api.html\napiToken = \"secret\"\nean = \"5099750442227\" # Thriller\n\neansearch = EANSearch(apiToken)\n\nname = eansearch.barcodeLookup(ean)\nprint(ean, \" is \", name)\n\n# more detailed result, preferrably in English (1)\nproduct = eansearch.barcodeSearch(ean, 1)\nprint(ean, \" is \", product[\"name\"].encode(\"utf-8\"), \" from category \", product[\"categoryName\"], \" issued in \", product[\"issuingCountry\"])\n\nisbn = \"1119578884\"\ntitle = eansearch.isbnLookup(isbn)\nprint(isbn, \" is \", title)\n\nok = eansearch.verifyChecksum(ean)\nprint(ean, \" is \", \"OK\" if ok else \"Not OK\")\n\neanList = eansearch.productSearch('iPod')\nfor product in eanList:\n\tprint(product[\"ean\"], \" is \", product[\"name\"].encode(\"utf-8\"))\n\neanList = eansearch.similarProductSearch('iPod with extra features')\nfor product in eanList:\n\tprint(product[\"ean\"], \" is \", product[\"name\"].encode(\"utf-8\"))\n\neanList = eansearch.categorySearch(45, 'thriller')\nfor product in eanList:\n\tprint(product[\"ean\"], \" is \", product[\"name\"].encode(\"utf-8\"))\n\neanList = eansearch.barcodePrefixSearch('4007249146')\nfor product in eanList:\n\tprint(product[\"ean\"], \" is \", product[\"name\"].encode(\"utf-8\"))\n\ncountry = eansearch.issuingCountryLookup(\"5099750442227\")\nprint(ean + \" was issued in \" + country)\n\nbarcode = eansearch.barcodeImage(\"5099750442227\")\nprint(\"Barcode image for \" + ean + \" (base64 encoded): \" + barcode)\n\n#import base64\n#print (base64.b64decode(barcode))\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python class for EAN and ISBN name lookup and validation using the API on ean-search.org",
    "version": "1.8.3",
    "project_urls": {
        "Homepage": "https://github.com/eansearch/python-ean-search"
    },
    "split_keywords": [
        "barcode",
        "barcodes",
        "ean",
        "ean13",
        "ean-13",
        "upc",
        "gtin",
        "isbn13",
        "isbn-13",
        "search",
        "lookup",
        "find",
        "valid",
        "validation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e5d424f3459196ffc09e7f32245cff7971848be79c4a3db5f800578294946f50",
                "md5": "4abaebf18debe29636c529bdd7b60f09",
                "sha256": "cac2b5b77a55692033468be548e3585b1afc5a899f1fd07be93154c4bf660ee1"
            },
            "downloads": -1,
            "filename": "eansearch-1.8.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4abaebf18debe29636c529bdd7b60f09",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=2.0",
            "size": 3990,
            "upload_time": "2025-01-07T15:26:44",
            "upload_time_iso_8601": "2025-01-07T15:26:44.750138Z",
            "url": "https://files.pythonhosted.org/packages/e5/d4/24f3459196ffc09e7f32245cff7971848be79c4a3db5f800578294946f50/eansearch-1.8.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8e289d0f39e1f6d721a5c1e4ada003c897777e57d9270508a9c2c5f4669bdef1",
                "md5": "ecdd319459fefdd4874dd978c7164bfd",
                "sha256": "4240556d4e1071f3f6d0e9bc07a8312ed13a05b3ddd532d28cafc16d0a67b63a"
            },
            "downloads": -1,
            "filename": "eansearch-1.8.3.tar.gz",
            "has_sig": false,
            "md5_digest": "ecdd319459fefdd4874dd978c7164bfd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.0",
            "size": 3636,
            "upload_time": "2025-01-07T15:26:47",
            "upload_time_iso_8601": "2025-01-07T15:26:47.852863Z",
            "url": "https://files.pythonhosted.org/packages/8e/28/9d0f39e1f6d721a5c1e4ada003c897777e57d9270508a9c2c5f4669bdef1/eansearch-1.8.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-07 15:26:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "eansearch",
    "github_project": "python-ean-search",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "eansearch"
}
        
Elapsed time: 0.39315s