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
- Set up your environment variables in a
.envfile:
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
- 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
- Clone the repository
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install development dependencies:
pip install -e ".[dev]"
- 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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cc209d0278eaa84cee86283e5d72485f35867eada8d84562678a21c7074bc97
|
|
| MD5 |
5d79cc1c87382ca85c705d066969c3fb
|
|
| BLAKE2b-256 |
58531ce7d83c6650fcfa20c42ca33a18acdcd3d87c3a0992a3b39a2c91b57f5d
|
File details
Details for the file ecommerce_toolkit-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ecommerce_toolkit-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38d5cc103bcc8ebee96d3d7ce04b15423f092c402412cc1d0f24d2e1f7a3ecbc
|
|
| MD5 |
cf3daac0d8a9f3ffd467787259c75341
|
|
| BLAKE2b-256 |
9459cd3f5bcadc25ed54224cfb56035c2fbeb0b8d7e3c2167135f879000b63c9
|