Python client for EAN-DB API
Project description
EAN-DB Python client
This is a Python client for EAN-DB API.
EAN-DB is an online API for product info lookups by EAN / UPC / ISBN. Product info includes titles in various languages, categories, manufacturer, images and additional metadata.
For more information, please see API docs and Database stats.
Installation
pip install eandb
Usage
Asynchronous client
>>> from eandb.clients.v2 import EandbV2AsyncClient
>>> eandb_client = EandbV2AsyncClient(jwt='YOUR_JWT_GOES_HERE')
>>> response = await eandb_client.get_product('0016065024615')
Synchronous client
>>> from eandb.clients.v2 import EandbV2SyncClient
>>> eandb_client = EandbV2SyncClient(jwt='YOUR_JWT_GOES_HERE')
>>> response = eandb_client.get_product('0016065024615')
>>> response
ProductResponse(
balance=100, error=None,
product=Product(
barcode='0016065024615',
titles={'en': 'Pretty Tied Up'},
categories=[
Category(id='855', titles={'en': 'Music & Sound Recordings', ...})
],
manufacturer=Manufacturer(id=None, titles={'de': 'Geffen'}, wikidataId=None),
relatedBrands=[],
images=[Image(url='...')],
metadata=Metadata(
externalIds=None,
generic=Generic(
weight=None,
manufacturerCode=None,
color=None,
ingredients=None,
contributors=[Contributor(names={'en': "Guns N' Roses"}, type='artist')]
),
food=None,
printBook=None,
musicCD=None
)
)
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
eandb-0.3.0.tar.gz
(3.8 kB
view details)
Built Distribution
eandb-0.3.0-py3-none-any.whl
(4.7 kB
view details)
File details
Details for the file eandb-0.3.0.tar.gz
.
File metadata
- Download URL: eandb-0.3.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.0 Darwin/23.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 406ab7f987de1362c68a358105d8a8dae6add61fd2e5d90da882a3c7578897f6 |
|
MD5 | 39243d77fab779d4e3a7aee99df55da8 |
|
BLAKE2b-256 | 8bbdcc7e08a401f5e9f247b8e3f449dc2cf4bf42755d136e92bfb7ba3e9dd11a |
File details
Details for the file eandb-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: eandb-0.3.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.0 Darwin/23.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e9f3be8108ba0bc6b082cc6ba128d8b242becbc1426d75a90f3596523b94ddf |
|
MD5 | 2a5ec90c26308b65f68d0810718e3b93 |
|
BLAKE2b-256 | 44d5f6137a087d0f4637c4ed963f9413606f337020dc6b22491f351d12ceaaba |