eansearch


Nameeansearch JSON
Version 1.7.0 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_time2024-04-18 19:31:35
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"])

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

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/ab/ed/6d7dcbfb0f9be8d57af621b43e928a6639ce9a584a93cd51f550a802c127/eansearch-1.7.0.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\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.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.7.0",
    "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": "abed6d7dcbfb0f9be8d57af621b43e928a6639ce9a584a93cd51f550a802c127",
                "md5": "e71dc54b5252b5c09f8f31fbfc108072",
                "sha256": "16a376c0be41592653d30f291238c6f0c0e26cfe8ad3b9713056aaf44513b284"
            },
            "downloads": -1,
            "filename": "eansearch-1.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e71dc54b5252b5c09f8f31fbfc108072",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.0",
            "size": 3371,
            "upload_time": "2024-04-18T19:31:35",
            "upload_time_iso_8601": "2024-04-18T19:31:35.824785Z",
            "url": "https://files.pythonhosted.org/packages/ab/ed/6d7dcbfb0f9be8d57af621b43e928a6639ce9a584a93cd51f550a802c127/eansearch-1.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-18 19:31:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "eansearch",
    "github_project": "python-ean-search",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "eansearch"
}
        
Elapsed time: 0.23494s