Skip to main content

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)

Metadata

Release files for python-google-shopping 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-google-shopping 0.1
File Size Uploaded Provenance
python-google-shopping-0.1.tar.gz 4.8 kB Without provenance Details

Release files / python-google-shopping-0.1.tar.gz

Download URL python-google-shopping-0.1.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a769f3d1b4838ad68e2afeebdb536d9f82f392c8ea6d1db24b886b4e39b22ce4
BLAKE2b-256 checksum
How to use checksums
80d4ed328d07b327b3be8748f37036e351f72c64e6eaf24d6d9a2ff2d362951b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for python-google-shopping 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page