Metadata-Version: 2.1
Name: em-tasks
Version: 0.2.7
Summary: EM website support tasks.
Home-page: https://github.com/VG-IT/em-tasks
Author: VG
Author-email: neal.wkacc@gmail.com
License: MIT
Keywords: ecommerce,spree,shopify,python
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Dist: ShopifyAPI
Requires-Dist: cmutils
Requires-Dist: dropshipping>=0.1.98
Requires-Dist: shopify-python-api-patcher
Requires-Dist: shopping-utils
Requires-Dist: peewee
Requires-Dist: pymysql
Requires-Dist: google-auth
Requires-Dist: google-ads
Requires-Dist: dateparser
Requires-Dist: pint
Requires-Dist: requests
Requires-Dist: google-api-python-client
Requires-Dist: oauth2client
Requires-Dist: gspread==5.7.1
Requires-Dist: tracking-numbers
Requires-Dist: shipstation
Requires-Dist: tracking-tracker
Requires-Dist: usps-api
Requires-Dist: bizdays
Requires-Dist: checkdigit
Requires-Dist: numpy<2
Requires-Dist: google-cloud-core
Requires-Dist: google-cloud-bigquery
Requires-Dist: psycopg[binary]

EM Tasks
========

EM Tasks to support website, like product create/update/delete, google shopping integration, etc

Repository layout for data tools (download / format / filter / upload): see [docs/architecture.md](docs/architecture.md).  
Python packaging alignment (library + batch tools): [docs/python_conventions.md](docs/python_conventions.md).

Amazon uploadable product filter
--------------------------------

Streams ASINs from Elasticsearch, applies index pre-filters, rules, blacklist, offers, and listing pipeline, then writes stats, per-bucket ASIN files, and **`filtered_asins_by_category/`** for manual QA.

**Full run logic, CLI, cron:** [docs/amazon_listing_filter.md](docs/amazon_listing_filter.md)

### Run (bash, cron-friendly)

```bash
./scripts/amazon-uploadable-filter.sh de
```

Settings (offer TTL, ASIN stream window, price rules) are read from **`~/.em_celery/config.ini`** only.

### Run (python)

```bash
python -m em_tasks.amazon.listing.cli.uploadable_product_filter --help

python -m em_tasks.amazon.listing.cli.uploadable_product_filter -m de
```

### CLI options

| Option | Description |
|--------|-------------|
| `-m`, `--marketplace` | Marketplace code (`us`, `de`, â€¦); default `us`. |

### Configuration (`~/.em_celery/config.ini`)

Flat keys via `em_celery.get_config()`:

```ini
amz.uploadable_filter.ttl = 30
amz.uploadable_filter.asin_stream_time_field = auto
amz.uploadable_filter.asin_stream_since_days = 7
amz.uploadable_filter.asin_stream_cutoff =
amz.uploadable_filter.asin_stream_label =
amz.uploadable_filter.asin_stream_label_field = label
```

Price rules per marketplace: `price.rules.amz_{marketplace}` (e.g. `price.rules.amz_de`).

Logs include **`[AsinStreamConfig]`** and **`[PriceRulesConfig]`** with resolved values.

### Output

Under **`~/.em_tasks/amz_{marketplace}/`**:

- `statss.txt` â€” one JSON line per run (includes `readable_summary`).
- Existing files: `blacklisted_products.txt`, `unuploadable_products.txt`, `to_upload_asins.txt`, `rule_filtered/`, etc.
- **`filtered_asins_by_category/`** â€” same ASINs grouped by rejection path, plus `README.txt` and `summary.json` for quick counts.

Metrics may also be written to Elasticsearch index `amz_uploadable_filter_metrics_{marketplace}` when `save_uploadable_filter_metrics` succeeds.

Implementation notes: `em_tasks/amazon/listing/cli/uploadable_product_filter.py`, `asin_stream_options.py`, `em_tasks/tools/amz_upload_products_from_es.py`, `em_tasks/tools/amz_upload/product_id_filter.py`.

amz uk overweight check 01/25 -02/23
https://everymarket.com/dashboard/order_items/cancel_refunds?from_date=2026-01-25&product_problem=OverWeight&source=AMZ_UK&to_date=2026-02-23

python tests/download_product_info.py --country uk --keyword overweight --asins B0CGRYMK26 B09VH2FRTM B0DCCBGZJH B092JK1K2Z B092JK1K2Z B0CKK2VH8B B0CZ17K8NR B08W5F5NYD B003XRPOYE B0FCY746Z8 B07RF8NLK3 B0DZPK7SP8 B0D7D5TQ58 B0BX71L2Q5




TODO: 
Our system can not detact products with magnetic components.


cow urine

https://www.amazon.in/dp/B0FPXDP2SX battery can not distinguish

https://everymarket.com/dashboard/order_items/353095 need to check similar products


jp : blacklist 


ae:
B08QGS3GY4 the price and weight does not match


