Developer toolkit for ecommerce catalog translation across URL/CSV sources and platform CSV targets.
Project description
Shelfshift
Shelfshift is a developer toolkit for ecommerce catalog translation.
Given a product source (URL or CSV), Shelfshift normalizes it into a canonical product model and exports platform-specific CSVs for:
- Shopify
- BigCommerce
- Wix
- Squarespace
- WooCommerce
This project is built for ecommerce developers and integration engineers who need reliable, automatable catalog pipelines.
Positioning
shelfshift.core: the primary product (importable Python library)shelfshiftCLI: automation and local workflowsshelfshift.server: self-hosted FastAPI API surface- Web UI: demo interface for core/server capabilities, not the primary target
Core Capabilities
- URL detection (
shopify,woocommerce,squarespace,amazon,aliexpress) - URL import to canonical product(s)
- CSV platform detection + CSV import to canonical product(s)
- Canonical product validation
- Canonical -> target-platform CSV export
- Single and batch export flows
Package Surfaces
- Library:
shelfshift.core - CLI:
shelfshift(entrypoint frompyproject.toml) - Server runner:
shelfshift-server
Supported Inputs
URL import sources
- Shopify product URLs
- WooCommerce product/store API URLs
- Squarespace product URLs
- Amazon product URLs (requires
RAPIDAPI_KEY) - AliExpress product URLs (requires
RAPIDAPI_KEY)
CSV import sources
- Shopify
- BigCommerce
- Wix
- Squarespace
- WooCommerce
Compatibility
- Python:
>=3.10 - URL imports:
shopify,woocommerce,squarespace,amazon,aliexpress - CSV imports:
shopify,bigcommerce,wix,squarespace,woocommerce - CSV exports:
shopify,bigcommerce,wix,squarespace,woocommerce
Installation
From PyPI (recommended for users)
pip install shelfshift
Or with uv in a project:
uv add shelfshift
uv sync
Quick smoke test:
python -c "import shelfshift, shelfshift.core; print(shelfshift.__version__)"
shelfshift --help
Running Commands
Use one of the following workflows for CLI and server commands:
- One-off invocation with
uv run:
uv run shelfshift detect ./source.csv
- Activate
.venvand run commands directly (recommended for repeated local development):
source .venv/bin/activate
shelfshift detect ./source.csv
When .venv is activated, you do not need uv run prefixes.
Optional local env file:
cp .env.example .env
Quick Start (Library)
from shelfshift.core import import_url, export_csv
# 1) Import canonical product from URL
result = import_url("https://example.myshopify.com/products/demo-item")
product = result.products[0]
# 2) Export to target platform CSV
exported = export_csv(product, target="shopify", options={"publish": False, "weight_unit": "g"})
with open("product.csv", "wb") as f:
f.write(exported.csv_bytes)
Batch URL import:
from shelfshift.core import import_url
result = import_url([
"https://store-a.com/products/a",
"https://store-b.com/products/b",
])
# result.products and result.errors support partial-success workflows
print(len(result.products), len(result.errors))
Amazon/AliExpress import with explicit key (preferred over env fallback):
from shelfshift.core import import_url
result = import_url(
"https://www.amazon.com/dp/B0C1234567",
rapidapi_key="your-rapidapi-key",
)
Quick Start (CLI)
Detect URL or CSV input:
shelfshift detect "https://example.myshopify.com/products/demo-item"
shelfshift detect ./source.csv
Import URL(s) to canonical JSON:
shelfshift import-url "https://example.myshopify.com/products/demo-item"
shelfshift import-url "https://store-a.com/products/a" "https://store-b.com/products/b"
For Amazon/AliExpress URLs, pass an explicit key (or set RAPIDAPI_KEY in env):
shelfshift import-url "https://www.amazon.com/dp/B0C1234567" --rapidapi-key "your-rapidapi-key"
Import source CSV to canonical JSON:
shelfshift import-csv ./source.csv --source-platform shopify
For bigcommerce, wix, and squarespace source CSVs, also pass --source-weight-unit:
shelfshift import-csv ./source.csv --source-platform squarespace --source-weight-unit kg
Convert source CSV directly to target CSV:
shelfshift convert ./source.csv --to shopify --out ./converted.csv --report ./report.json
If the source CSV platform is bigcommerce, wix, or squarespace, include --source-weight-unit:
shelfshift convert ./source.csv --source squarespace --source-weight-unit kg --to shopify --out ./converted.csv
Validate canonicalized products from CSV:
shelfshift validate ./source.csv --platform shopify --report ./validate.json
For bigcommerce, wix, and squarespace source CSVs, include --source-weight-unit:
shelfshift validate ./source.csv --platform wix --source-weight-unit kg --report ./validate.json
Export canonical JSON payload to target CSV:
shelfshift export-csv ./canonical.json --to woocommerce --out ./woocommerce.csv
Self-Hosted API (FastAPI)
Start server:
shelfshift-server
or:
uvicorn shelfshift.server.main:app --reload
Programmatic app creation with explicit settings:
from shelfshift.config import Settings
from shelfshift.server.main import create_app
app = create_app(
settings=Settings(
app_name="ShelfShift Internal",
app_tagline="Catalog bridge",
brand_primary="#18d9b6",
brand_secondary="#27c6f5",
brand_ink="#020b1a",
debug=True,
log_verbosity="high",
rapidapi_key="your-key",
cors_allow_origins=("https://admin.example.com",),
)
)
Open:
- Swagger UI:
http://127.0.0.1:8000/docs - Landing page:
http://127.0.0.1:8000/ - URL demo UI:
http://127.0.0.1:8000/url - CSV demo UI:
http://127.0.0.1:8000/csv
API Routes
GET /healthGET /api/v1/detectPOST /api/v1/importPOST /api/v1/detect/csvPOST /api/v1/import/csvPOST /api/v1/export/from-product.csvPOST /api/v1/export/shopify.csvPOST /api/v1/export/bigcommerce.csvPOST /api/v1/export/wix.csvPOST /api/v1/export/squarespace.csvPOST /api/v1/export/woocommerce.csv
API Examples
Detect URL:
curl "http://127.0.0.1:8000/api/v1/detect?url=https://example.myshopify.com/products/demo-item"
Import URL(s):
curl -X POST "http://127.0.0.1:8000/api/v1/import" \
-H "Content-Type: application/json" \
-d '{"product_urls": ["https://example.myshopify.com/products/demo-item"]}'
Import CSV:
curl -X POST "http://127.0.0.1:8000/api/v1/import/csv" \
-F "source_platform=shopify" \
-F "file=@./source.csv"
For bigcommerce, wix, and squarespace source CSVs, include source_weight_unit (g|kg|lb|oz):
curl -X POST "http://127.0.0.1:8000/api/v1/import/csv" \
-F "source_platform=squarespace" \
-F "source_weight_unit=kg" \
-F "file=@./source.csv"
Export from canonical payload:
curl -X POST "http://127.0.0.1:8000/api/v1/export/from-product.csv" \
-H "Content-Type: application/json" \
-d '{"product": {"source": {"platform": "shopify"}, "title": "Demo"}, "target_platform": "shopify"}' \
-o out.csv
Canonical Model
All importers normalize into the Shelfshift canonical entities under:
shelfshift.core.canonical.entitiesshelfshift.core.canonical.serialization
This canonical layer is the contract between import and export stages.
Extensibility
Registry hooks are available via:
shelfshift.core.register_importershelfshift.core.register_exportershelfshift.core.list_importersshelfshift.core.list_exporters
Use these for custom importer/exporter integration in internal tooling.
Runtime Configuration Precedence
Shelfshift resolves runtime settings in this order:
- Explicit runtime input (API args, CLI flags,
create_app(settings=...)). - Process environment (including values loaded from
.env). - Built-in defaults.
Configuration is resolved per core call or per server app instance (no request-level live reload).
Environment Variables
APP_NAME: server/web titleAPP_TAGLINE: server/web subtitleBRAND_PRIMARY: UI primary colorBRAND_SECONDARY: UI secondary colorBRAND_INK: UI text colorDEBUG: include/excluderawin API import responsesLOG_VERBOSITY:low | medium | high | extrahighRAPIDAPI_KEY: required for Amazon/AliExpress URL importsCORS_ALLOW_ORIGINS: comma-separated CORS allowlist
License
This project is licensed under the MIT License. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shelfshift-1.0.1.tar.gz.
File metadata
- Download URL: shelfshift-1.0.1.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
286fde334f677879cca37ecc6ad634b65436cd1689cf075f9648c2e9a31ee2cc
|
|
| MD5 |
b2b1c92f1b980349437507ea341b92d2
|
|
| BLAKE2b-256 |
d49c385cb3e592db44c5bab3b6cabd4dace9712e76a4dc79c0a6dde9e3db461d
|
File details
Details for the file shelfshift-1.0.1-py3-none-any.whl.
File metadata
- Download URL: shelfshift-1.0.1-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbd98b2e2680cfeb4c3083683cec0bae827691651d102dc0106323b052a03a36
|
|
| MD5 |
ed065dfeb988e92de22a4a016e44af35
|
|
| BLAKE2b-256 |
1554eed8c8501b697daae54dff766a5fb75f762ab05175b3e6f988df44f47d38
|