vgdev/stable/: shopping-utils-0.2.0 metadata and description

Homepage Simple index

Wrappers for shopping APIs like Google Merchant API, Bing Content API, etc.

author Neal Wong
author_email neal.wkacc@gmail.com
classifiers
  • Development Status :: 3 - Alpha
  • Intended Audience :: Developers
  • License :: OSI Approved :: MIT License
  • Natural Language :: English
  • Operating System :: OS Independent
  • Programming Language :: Python :: 2
  • Programming Language :: Python :: 2.7
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.4
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.5
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.6
  • Programming Language :: Python :: 3.7
  • Programming Language :: Python :: Implementation :: CPython
  • Topic :: Software Development :: Libraries :: Python Modules
  • Topic :: Utilities
keywords google shopping,merchant api,content api
license MIT
requires_dist
  • requests
  • pycryptodome
  • google-api-python-client
  • google-auth
  • google-auth-httplib2
  • wrapt
  • six
  • bing-content-api
File Tox results History
shopping_utils-0.2.0-py2.py3-none-any.whl
Size
23 KB
Type
Python Wheel
Python
2.7
shopping-utils
=====================

Shopping utils aims to supply useful wrappers for shopping APIs like Google Merchant API and Bing Content API.

Google Shopping uses Merchant API (`products_v1` / `reports_v1` / `datasources_v1`). Content API for Shopping is sunset on August 18, 2026.

Before first Merchant API calls, link the Cloud project to Merchant Center (`developerRegistration:registerGcp`). Writes require an API primary data source.

```python
GoogleShopping(merchant_id, service_account_info, data_source='accounts/{account}/dataSources/{id}')
```

Product payloads may still use Content API field layout (`title`, `price.value`, `online:en:US:sku`). They are converted to Merchant API `productInputs` (`productAttributes`, `amountMicros`, `en~US~sku`) on write.

Long-running jobs (`update_expiration`, `cleanup`) checkpoint by default. Existing files are looked up in this order:

1. `checkpoint_path=` argument
2. `GoogleShopping(..., checkpoint_dir=...)`
3. environment variable `SHOPPING_UTILS_CHECKPOINT_DIR`
4. `./shopping-utils-checkpoints/merchant-{id}-{operation}.json`
5. `~/.shopping-utils/checkpoints/merchant-{id}-{operation}.json`

If none exist, a new file is created in the first available directory above. Failed writes go to `{checkpoint_path}.failed.jsonl` and are retried on resume. Delete/patch treats HTTP 404 as already done. Re-run the same command to continue; `resume=False` starts a new job; `checkpoint_path=False` disables checkpointing.

```python
shopping.update_expiration()
for _ in shopping.cleanup():
pass
```

Installation
-------------

You can install shopping-utils with `pip`:

pip install shopping-utils




Render warnings:
<string>:29: (ERROR/3) Unexpected indentation.