Skip to main content

Python client for Google Shopping API

Project description

Package Version

Python client for Google Content API for Shopping v2.1

Installation

pip install py-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='UK')

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

License

License stuff is here.

Support

This version is a backport of the previous version by Nam Ngo. We’ll continue to support it! 😉

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

py-google-shopping-0.2.2.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

py_google_shopping-0.2.2-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file py-google-shopping-0.2.2.tar.gz.

File metadata

  • Download URL: py-google-shopping-0.2.2.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for py-google-shopping-0.2.2.tar.gz
Algorithm Hash digest
SHA256 75b6a79bc2523f6c9a180ac3a2055900afff6da3f81323901bd27e71980b0617
MD5 b8ea30d276a185fc6caf2dfca6d8da4f
BLAKE2b-256 e6bbe5b86c9882f3bb33fc38e2bcc0c401120e54f8e8af01ad0161b1a49927d5

See more details on using hashes here.

File details

Details for the file py_google_shopping-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: py_google_shopping-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for py_google_shopping-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e2ce4a9e7cd6c1b9c3ed43cbec839b2609ebe745158f272c56488138f34c1a2d
MD5 b1df180a90a6156e46f977b53863ba58
BLAKE2b-256 4a905b6833e774f690139d1711e0f428bacad692afc962df0f2c38b82ac40f07

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page