Python client for Google Shopping API
Project description
Python client for Google Content API v2
Installation
pip install python-google-shopping
Features
Handles OAuth2 sanely through ENV variables
Handles pagination with iterators
Pads and adds checksum to GTIN of products automatically
Works well with Django and other frameworks
Usage
Basic
export GOOGLE_SHOPPING_CLIENT_ID=my_client_id
export GOOGLE_SHOPPING_CLIENT_SECRET=my_client_secret
export GOOGLE_SHOPPING_REFRESH_TOKEN=my_refresh_token
from google_shopping import Merchant
merchant_id = '536476575676'
merchant = Merchant(merchant_id, country_code='AU')
# Get product resource
product_resource = merchant.products.get(1234)
# Get all products
products = list(merchant.products.list())
# Iterate through products (generator)
for product in merchant.products.list():
print product.title
# Delete product resource
product = Product.objects.order_by('?').first()
merchant.products.delete(product.id)
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
File details
Details for the file python-google-shopping-0.1.tar.gz
.
File metadata
- Download URL: python-google-shopping-0.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a769f3d1b4838ad68e2afeebdb536d9f82f392c8ea6d1db24b886b4e39b22ce4 |
|
MD5 | cf190c3020acb90c43a190c91924d666 |
|
BLAKE2b-256 | 80d4ed328d07b327b3be8748f37036e351f72c64e6eaf24d6d9a2ff2d362951b |