Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 1.56 KB

File metadata and controls

47 lines (31 loc) · 1.56 KB

Google Merchant API Python Samples

This is a set of simple samples written in Python, which provide a minimal example of Google Shopping integration within a command line application.

This starter project provides a great place to start your experimentation into the Google Merchant API for Shopping.

Supported Python Versions

Python >= 3.8

Use a virtual environment

python3 -m venv <your-env>
source <your-env>/bin/activate
pip install -r requirements.txt

Prerequisites

For your convenience, you can run the following command from this directory to install all needed dependencies via pip:

pip install -r requirements.txt

Setup Authentication and Sample Configuration

If you have not already done so, please read the top-level README to discover how to set up the authentication configuration. The rest of this document assumes you have performed both tasks.

Running the Samples

We are assuming you've checked out the code and are reading this from a local directory. If not, check out the code to a local directory.

Before calling any v1 Merchant API method, you will need to register the GCP project used to call the APIs. You can do that by running the code sample examples.accounts.developerregistration.v1.register_gcp_sample. More informations can be found here.

  1. Start up a sample:

    python -m examples.products.v1.list_products_sample
    
  2. Examine your shell output, be inspired and start hacking an amazing new app!