Skip to main content

A unified interface for e-commerce platform APIs

Project description

E-commerce Toolkit

A unified interface for interacting with various e-commerce platform APIs. Currently supports Shopify and WooCommerce.

Features

  • Automatic platform detection
  • Simple, unified interface for all supported platforms
  • Environment-based configuration
  • Product listing, search, and detailed view capabilities

Installation

pip install ecommerce-toolkit

Quick Start

  1. Set up your environment variables in a .env file:
STORE_URL=your-store.com
STORE_TYPE=shopify  # or woocommerce

# For Shopify
SHOPIFY_ACCESS_TOKEN=your_access_token

# For WooCommerce
WOO_CONSUMER_KEY=your_consumer_key
WOO_CONSUMER_SECRET=your_consumer_secret
  1. Use the toolkit:
from ecommerce_toolkit import toolkit

# List all products
products = toolkit.list_all_products()

# Search for products
results = toolkit.search_store("t-shirt")

# Get specific product
product = toolkit.get_product_details("123")

Development

  1. Clone the repository
  2. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install development dependencies:
pip install -e ".[dev]"
  1. Run tests:
pytest tests/

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Structure

ecommerce_toolkit/ │ ├── src/ │ └── ecommerce_toolkit/ │ ├── init.py │ ├── providers/ │ │ ├── init.py │ │ ├── base.py # Contains EcommerceProvider ABC │ │ ├── shopify.py # ShopifyProvider implementation │ │ └── woocommerce.py # WooCommerceProvider implementation │ ├── models/ │ │ ├── init.py │ │ └── product.py # Product dataclass │ ├── config.py # StoreConfig class │ └── toolkit.py # Main EcommerceToolkit class │ ├── tests/ │ ├── init.py │ ├── test_shopify.py │ ├── test_woocommerce.py │ └── test_toolkit.py │ ├── examples/ │ ├── basic_usage.py │ └── advanced_usage.py │ ├── .env.example ├── .gitignore ├── LICENSE ├── MANIFEST.in ├── pyproject.toml ├── README.md └── requirements.txt

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ecommerce_toolkit-0.1.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ecommerce_toolkit-0.1.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file ecommerce_toolkit-0.1.1.tar.gz.

File metadata

  • Download URL: ecommerce_toolkit-0.1.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for ecommerce_toolkit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0cc209d0278eaa84cee86283e5d72485f35867eada8d84562678a21c7074bc97
MD5 5d79cc1c87382ca85c705d066969c3fb
BLAKE2b-256 58531ce7d83c6650fcfa20c42ca33a18acdcd3d87c3a0992a3b39a2c91b57f5d

See more details on using hashes here.

File details

Details for the file ecommerce_toolkit-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ecommerce_toolkit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38d5cc103bcc8ebee96d3d7ce04b15423f092c402412cc1d0f24d2e1f7a3ecbc
MD5 cf3daac0d8a9f3ffd467787259c75341
BLAKE2b-256 9459cd3f5bcadc25ed54224cfb56035c2fbeb0b8d7e3c2167135f879000b63c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page