cli-market-core 1.9.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cli_market_core-1.9.5/PKG-INFO +16 -0
- cli_market_core-1.9.5/README.md +76 -0
- cli_market_core-1.9.5/cli_market_core.egg-info/PKG-INFO +16 -0
- cli_market_core-1.9.5/cli_market_core.egg-info/SOURCES.txt +78 -0
- cli_market_core-1.9.5/cli_market_core.egg-info/dependency_links.txt +1 -0
- cli_market_core-1.9.5/cli_market_core.egg-info/requires.txt +9 -0
- cli_market_core-1.9.5/cli_market_core.egg-info/top_level.txt +25 -0
- cli_market_core-1.9.5/dashboard_glossary.py +3 -0
- cli_market_core-1.9.5/dashboard_quality.py +3 -0
- cli_market_core-1.9.5/dashboard_renderer.py +3 -0
- cli_market_core-1.9.5/dashboard_view_model.py +3 -0
- cli_market_core-1.9.5/data_v1_service.py +3 -0
- cli_market_core-1.9.5/market_alerts.py +3 -0
- cli_market_core-1.9.5/market_basket.py +4 -0
- cli_market_core-1.9.5/market_billing.py +3 -0
- cli_market_core-1.9.5/market_connectors/__init__.py +18 -0
- cli_market_core-1.9.5/market_connectors/base.py +36 -0
- cli_market_core-1.9.5/market_connectors/email_outbound.py +918 -0
- cli_market_core-1.9.5/market_connectors/lemon_payments.py +33 -0
- cli_market_core-1.9.5/market_connectors/magento.py +95 -0
- cli_market_core-1.9.5/market_connectors/mercadopago_payments.py +281 -0
- cli_market_core-1.9.5/market_connectors/minimax.py +63 -0
- cli_market_core-1.9.5/market_connectors/paypal_payments.py +327 -0
- cli_market_core-1.9.5/market_connectors/shopify.py +126 -0
- cli_market_core-1.9.5/market_connectors/sunat_invoicing.py +120 -0
- cli_market_core-1.9.5/market_connectors/vtex.py +411 -0
- cli_market_core-1.9.5/market_connectors/wise_payments.py +37 -0
- cli_market_core-1.9.5/market_connectors/woocommerce.py +278 -0
- cli_market_core-1.9.5/market_core/__init__.py +4 -0
- cli_market_core-1.9.5/market_core/dashboard_glossary.py +370 -0
- cli_market_core-1.9.5/market_core/dashboard_quality.py +45 -0
- cli_market_core-1.9.5/market_core/dashboard_renderer.py +609 -0
- cli_market_core-1.9.5/market_core/dashboard_view_model.py +630 -0
- cli_market_core-1.9.5/market_core/data_v1_service.py +356 -0
- cli_market_core-1.9.5/market_core/market_alerts.py +400 -0
- cli_market_core-1.9.5/market_core/market_basket.py +104 -0
- cli_market_core-1.9.5/market_core/market_billing.py +399 -0
- cli_market_core-1.9.5/market_core/market_core.py +1078 -0
- cli_market_core-1.9.5/market_core/market_db.py +720 -0
- cli_market_core-1.9.5/market_core/market_enrich_sources.py +518 -0
- cli_market_core-1.9.5/market_core/market_enrich_subcategory.py +245 -0
- cli_market_core-1.9.5/market_core/market_health_alert.py +171 -0
- cli_market_core-1.9.5/market_core/market_indicators.py +1357 -0
- cli_market_core-1.9.5/market_core/market_intel_agent.py +258 -0
- cli_market_core-1.9.5/market_core/market_mcp.py +484 -0
- cli_market_core-1.9.5/market_core/market_security.py +113 -0
- cli_market_core-1.9.5/market_core/market_spread.py +534 -0
- cli_market_core-1.9.5/market_core/market_stats.py +139 -0
- cli_market_core-1.9.5/market_core/market_stores.py +98 -0
- cli_market_core-1.9.5/market_core/market_units.py +87 -0
- cli_market_core-1.9.5/market_core/price_confidence.py +64 -0
- cli_market_core-1.9.5/market_core/retailer_onboarding.py +304 -0
- cli_market_core-1.9.5/market_core/source_health.py +146 -0
- cli_market_core-1.9.5/market_core/store_credentials.py +304 -0
- cli_market_core-1.9.5/market_db.py +3 -0
- cli_market_core-1.9.5/market_enrich_sources.py +3 -0
- cli_market_core-1.9.5/market_enrich_subcategory.py +3 -0
- cli_market_core-1.9.5/market_health_alert.py +3 -0
- cli_market_core-1.9.5/market_indicators.py +3 -0
- cli_market_core-1.9.5/market_intel_agent.py +3 -0
- cli_market_core-1.9.5/market_mcp.py +3 -0
- cli_market_core-1.9.5/market_security.py +3 -0
- cli_market_core-1.9.5/market_spread.py +3 -0
- cli_market_core-1.9.5/market_stats.py +3 -0
- cli_market_core-1.9.5/market_units.py +3 -0
- cli_market_core-1.9.5/price_confidence.py +3 -0
- cli_market_core-1.9.5/pyproject.toml +75 -0
- cli_market_core-1.9.5/retailer_onboarding.py +3 -0
- cli_market_core-1.9.5/setup.cfg +4 -0
- cli_market_core-1.9.5/source_health.py +3 -0
- cli_market_core-1.9.5/store_credentials.py +3 -0
- cli_market_core-1.9.5/tests/test_dashboard.py +38 -0
- cli_market_core-1.9.5/tests/test_market_connectors.py +56 -0
- cli_market_core-1.9.5/tests/test_market_core.py +92 -0
- cli_market_core-1.9.5/tests/test_market_services.py +101 -0
- cli_market_core-1.9.5/tests/test_mercadopago_payments.py +34 -0
- cli_market_core-1.9.5/tests/test_mercadopago_signature.py +31 -0
- cli_market_core-1.9.5/tests/test_store_credentials_woocommerce.py +24 -0
- cli_market_core-1.9.5/tests/test_vtex_206.py +30 -0
- cli_market_core-1.9.5/tests/test_woocommerce_connector.py +108 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cli-market-core
|
|
3
|
+
Version: 1.9.5
|
|
4
|
+
Summary: CLI Market core — VTEX/Shopify/Magento/WooCommerce connectors, 68 retailers, collector, MCP primitives. MIT.
|
|
5
|
+
Author-email: CLI Market <hello@cli-market.dev>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Requires-Dist: httpx>=0.27
|
|
9
|
+
Requires-Dist: rich>=13.0
|
|
10
|
+
Requires-Dist: fastapi>=0.115
|
|
11
|
+
Requires-Dist: uvicorn>=0.30
|
|
12
|
+
Requires-Dist: pydantic>=2.0
|
|
13
|
+
Requires-Dist: python-multipart>=0.0.9
|
|
14
|
+
Requires-Dist: psycopg2-binary>=2.9
|
|
15
|
+
Requires-Dist: asyncpg>=0.29
|
|
16
|
+
Requires-Dist: playwright>=1.45.0
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# cli-market-core
|
|
2
|
+
|
|
3
|
+
> **Intelligence Layer** — Indicators, billing, connectors, and MCP tools for CLI Market
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install cli-market-core
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## What is this?
|
|
12
|
+
|
|
13
|
+
`cli-market-core` is the intelligence engine of the CLI Market ecosystem. It takes canonical product data from `cli-market-index` and adds market intelligence: price indicators, spread analysis, billing/payments, retailer connectors, and 43 MCP tools.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Ecosystem
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
cli-market-backend -> Data ingestion (scrapers, FastAPI)
|
|
21
|
+
cli-market-index -> Semantic Refinery (entity resolution, Golden Records)
|
|
22
|
+
cli-market-core -> Intelligence (THIS REPO)
|
|
23
|
+
cli-market-world -> Exposure (landing, docs, MCP registry)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Modules
|
|
29
|
+
|
|
30
|
+
| Module | Role |
|
|
31
|
+
|---|---|
|
|
32
|
+
| `market_core.py` | Core service orchestrator |
|
|
33
|
+
| `market_indicators.py` | 34 market indicators from shelf data |
|
|
34
|
+
| `market_spread.py` | Cross-retailer price spreads |
|
|
35
|
+
| `market_stats.py` | Platform statistics and version |
|
|
36
|
+
| `market_db.py` | Database access layer |
|
|
37
|
+
| `market_mcp.py` | 43 MCP tool definitions |
|
|
38
|
+
| `market_basket.py` | Basket comparison logic |
|
|
39
|
+
| `market_billing.py` | Subscription and billing |
|
|
40
|
+
| `market_alerts.py` | Price alert engine |
|
|
41
|
+
| `market_security.py` | Auth and webhook validation |
|
|
42
|
+
| `market_intel_agent.py` | AI agent intelligence queries |
|
|
43
|
+
| `market_enrich_sources.py` | External data enrichment (OFF, IMF, World Bank) |
|
|
44
|
+
| `market_enrich_subcategory.py` | Subcategory classification |
|
|
45
|
+
| `market_health_alert.py` | System health monitoring |
|
|
46
|
+
| `source_health.py` | Scraper health tracking |
|
|
47
|
+
| `price_confidence.py` | Price quality heuristics |
|
|
48
|
+
| `store_credentials.py` | Retailer credential management |
|
|
49
|
+
| `market_units.py` | Unit conversion utilities |
|
|
50
|
+
| `market_stores.py` | Retailer catalog |
|
|
51
|
+
| `retailer_onboarding.py` | Retailer onboarding workflow |
|
|
52
|
+
| `dashboard_glossary.py` | Dashboard metric definitions |
|
|
53
|
+
| `dashboard_quality.py` | Dashboard quality indicators |
|
|
54
|
+
| `dashboard_renderer.py` | Dashboard HTML renderer |
|
|
55
|
+
| `dashboard_view_model.py` | Dashboard data model |
|
|
56
|
+
| `data_v1_service.py` | Core data API endpoints |
|
|
57
|
+
| `market_connectors/` | PayPal, Mercado Pago, WooCommerce, VTEX, Shopify, SUNAT, etc. |
|
|
58
|
+
| `market_stats.py` | Canonical figures for README, PyPI, landing (run `sync_market_stats.py` in world) |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Version
|
|
63
|
+
|
|
64
|
+
Current: **1.9.5** — 68 retailers, 4 platforms (incl. WooCommerce FMCG pilot `nunaorganica_pe`)
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Dev setup
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pip install -e .
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
No external dependencies required in creation phase.
|
|
75
|
+
|
|
76
|
+
MIT License · [SINAPSIS INNOVADORA S.A.C.](https://cli-market.dev) · Lima, Peru
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cli-market-core
|
|
3
|
+
Version: 1.9.5
|
|
4
|
+
Summary: CLI Market core — VTEX/Shopify/Magento/WooCommerce connectors, 68 retailers, collector, MCP primitives. MIT.
|
|
5
|
+
Author-email: CLI Market <hello@cli-market.dev>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Requires-Dist: httpx>=0.27
|
|
9
|
+
Requires-Dist: rich>=13.0
|
|
10
|
+
Requires-Dist: fastapi>=0.115
|
|
11
|
+
Requires-Dist: uvicorn>=0.30
|
|
12
|
+
Requires-Dist: pydantic>=2.0
|
|
13
|
+
Requires-Dist: python-multipart>=0.0.9
|
|
14
|
+
Requires-Dist: psycopg2-binary>=2.9
|
|
15
|
+
Requires-Dist: asyncpg>=0.29
|
|
16
|
+
Requires-Dist: playwright>=1.45.0
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
dashboard_glossary.py
|
|
3
|
+
dashboard_quality.py
|
|
4
|
+
dashboard_renderer.py
|
|
5
|
+
dashboard_view_model.py
|
|
6
|
+
data_v1_service.py
|
|
7
|
+
market_alerts.py
|
|
8
|
+
market_basket.py
|
|
9
|
+
market_billing.py
|
|
10
|
+
market_db.py
|
|
11
|
+
market_enrich_sources.py
|
|
12
|
+
market_enrich_subcategory.py
|
|
13
|
+
market_health_alert.py
|
|
14
|
+
market_indicators.py
|
|
15
|
+
market_intel_agent.py
|
|
16
|
+
market_mcp.py
|
|
17
|
+
market_security.py
|
|
18
|
+
market_spread.py
|
|
19
|
+
market_stats.py
|
|
20
|
+
market_units.py
|
|
21
|
+
price_confidence.py
|
|
22
|
+
pyproject.toml
|
|
23
|
+
retailer_onboarding.py
|
|
24
|
+
source_health.py
|
|
25
|
+
store_credentials.py
|
|
26
|
+
cli_market_core.egg-info/PKG-INFO
|
|
27
|
+
cli_market_core.egg-info/SOURCES.txt
|
|
28
|
+
cli_market_core.egg-info/dependency_links.txt
|
|
29
|
+
cli_market_core.egg-info/requires.txt
|
|
30
|
+
cli_market_core.egg-info/top_level.txt
|
|
31
|
+
market_connectors/__init__.py
|
|
32
|
+
market_connectors/base.py
|
|
33
|
+
market_connectors/email_outbound.py
|
|
34
|
+
market_connectors/lemon_payments.py
|
|
35
|
+
market_connectors/magento.py
|
|
36
|
+
market_connectors/mercadopago_payments.py
|
|
37
|
+
market_connectors/minimax.py
|
|
38
|
+
market_connectors/paypal_payments.py
|
|
39
|
+
market_connectors/shopify.py
|
|
40
|
+
market_connectors/sunat_invoicing.py
|
|
41
|
+
market_connectors/vtex.py
|
|
42
|
+
market_connectors/wise_payments.py
|
|
43
|
+
market_connectors/woocommerce.py
|
|
44
|
+
market_core/__init__.py
|
|
45
|
+
market_core/dashboard_glossary.py
|
|
46
|
+
market_core/dashboard_quality.py
|
|
47
|
+
market_core/dashboard_renderer.py
|
|
48
|
+
market_core/dashboard_view_model.py
|
|
49
|
+
market_core/data_v1_service.py
|
|
50
|
+
market_core/market_alerts.py
|
|
51
|
+
market_core/market_basket.py
|
|
52
|
+
market_core/market_billing.py
|
|
53
|
+
market_core/market_core.py
|
|
54
|
+
market_core/market_db.py
|
|
55
|
+
market_core/market_enrich_sources.py
|
|
56
|
+
market_core/market_enrich_subcategory.py
|
|
57
|
+
market_core/market_health_alert.py
|
|
58
|
+
market_core/market_indicators.py
|
|
59
|
+
market_core/market_intel_agent.py
|
|
60
|
+
market_core/market_mcp.py
|
|
61
|
+
market_core/market_security.py
|
|
62
|
+
market_core/market_spread.py
|
|
63
|
+
market_core/market_stats.py
|
|
64
|
+
market_core/market_stores.py
|
|
65
|
+
market_core/market_units.py
|
|
66
|
+
market_core/price_confidence.py
|
|
67
|
+
market_core/retailer_onboarding.py
|
|
68
|
+
market_core/source_health.py
|
|
69
|
+
market_core/store_credentials.py
|
|
70
|
+
tests/test_dashboard.py
|
|
71
|
+
tests/test_market_connectors.py
|
|
72
|
+
tests/test_market_core.py
|
|
73
|
+
tests/test_market_services.py
|
|
74
|
+
tests/test_mercadopago_payments.py
|
|
75
|
+
tests/test_mercadopago_signature.py
|
|
76
|
+
tests/test_store_credentials_woocommerce.py
|
|
77
|
+
tests/test_vtex_206.py
|
|
78
|
+
tests/test_woocommerce_connector.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
dashboard_glossary
|
|
2
|
+
dashboard_quality
|
|
3
|
+
dashboard_renderer
|
|
4
|
+
dashboard_view_model
|
|
5
|
+
data_v1_service
|
|
6
|
+
market_alerts
|
|
7
|
+
market_basket
|
|
8
|
+
market_billing
|
|
9
|
+
market_connectors
|
|
10
|
+
market_core
|
|
11
|
+
market_db
|
|
12
|
+
market_enrich_sources
|
|
13
|
+
market_enrich_subcategory
|
|
14
|
+
market_health_alert
|
|
15
|
+
market_indicators
|
|
16
|
+
market_intel_agent
|
|
17
|
+
market_mcp
|
|
18
|
+
market_security
|
|
19
|
+
market_spread
|
|
20
|
+
market_stats
|
|
21
|
+
market_units
|
|
22
|
+
price_confidence
|
|
23
|
+
retailer_onboarding
|
|
24
|
+
source_health
|
|
25
|
+
store_credentials
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""market_connectors — Multi-platform e-commerce connectors."""
|
|
2
|
+
from .vtex import VtexConnector
|
|
3
|
+
from .shopify import ShopifyConnector
|
|
4
|
+
from .magento import MagentoConnector
|
|
5
|
+
from .woocommerce import WooCommerceConnector
|
|
6
|
+
|
|
7
|
+
_CONNECTORS = {
|
|
8
|
+
"vtex": VtexConnector(),
|
|
9
|
+
"shopify": ShopifyConnector(),
|
|
10
|
+
"magento": MagentoConnector(),
|
|
11
|
+
"woocommerce": WooCommerceConnector(),
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
def get_connector(platform: str):
|
|
15
|
+
conn = _CONNECTORS.get(platform)
|
|
16
|
+
if not conn:
|
|
17
|
+
raise ValueError(f"Unknown platform: {platform}. Known: {list(_CONNECTORS)}")
|
|
18
|
+
return conn
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""
|
|
2
|
+
market_connectors/base.py — Abstract connector interface.
|
|
3
|
+
|
|
4
|
+
Every e-commerce platform connector implements this protocol.
|
|
5
|
+
The rest of the system never knows which platform a store runs on.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from abc import ABC, abstractmethod
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class BaseConnector(ABC):
|
|
13
|
+
platform: str = ""
|
|
14
|
+
|
|
15
|
+
@abstractmethod
|
|
16
|
+
async def search(self, store_config: dict, term: str,
|
|
17
|
+
page: int = 1, limit: int = 20) -> list[dict]:
|
|
18
|
+
"""Search products. Returns raw platform-specific dicts."""
|
|
19
|
+
|
|
20
|
+
@abstractmethod
|
|
21
|
+
def normalize(self, raw: dict, store_key: str, store_config: dict) -> dict:
|
|
22
|
+
"""Convert raw product into unified schema:
|
|
23
|
+
{id, product_id, name, brand, category, price, list_price,
|
|
24
|
+
discount, stock, store, store_name, currency, url, line, line_name}"""
|
|
25
|
+
|
|
26
|
+
@abstractmethod
|
|
27
|
+
async def categories(self, store_config: dict) -> list[dict]:
|
|
28
|
+
"""Return category tree."""
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def parse_price(price: Any) -> float:
|
|
32
|
+
try: return float(price or 0)
|
|
33
|
+
except (ValueError, TypeError): return 0.0
|
|
34
|
+
|
|
35
|
+
def clean_name(name: str) -> str:
|
|
36
|
+
return name.replace("-", " ")
|