Metadata-Version: 2.4
Name: prestashop-webservice
Version: 0.2.7
Summary: Webservice client for PrestaShop API
Author-email: Nestor Villa <nestorvilla@patitasco.com>, Manolo Corte <manolocorte@patitasco.com>
License: MIT License
        
        Copyright (c) 2025 Patitas and Co
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Documentation, https://github.com/patitas-and-co/prestashop-webservice/blob/main/README.md
Project-URL: Repository, https://github.com/patitas-and-co/prestashop-webservice
Keywords: prestashop,api,client,webservice,rest
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx
Requires-Dist: cachetools
Requires-Dist: loguru
Requires-Dist: pre-commit
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: python-dotenv; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Dynamic: license-file

# PrestaShop Webservice

Python client for PrestaShop API with caching, logging, and type hints.

## Installation

```bash
pip install prestashop-webservice
```

## Quick Start

```python
from prestashop_webservice import Client, Params, Sort, SortOrder

# Initialize client
client = Client(
    prestashop_base_url="https://your-store.com/api",
    prestashop_ws_key="YOUR_API_KEY"
)

# Simple queries
order = client.query_order(order_id="123")
customer = client.query_customer(customer_id="456")

# Advanced queries with parameters
params = Params(
    filter={"id_customer": "123"},
    sort=Sort(field="date_add", order=SortOrder.DESC),
    display=["id", "total_paid", "reference"],
    limit=10
)
orders = client.query_orders(params=params)
```

## Features

- 🚀 HTTP client with connection pooling
- 💾 Automatic caching (24h TTL)
- 📝 Logging with Loguru
- 🎯 Full type hints
- 🔒 Singleton pattern

## Available Methods

- `query_order()`, `query_orders()`, `exists_order()`
- `query_customer()`, `query_customers()`
- `query_product()`, `query_address()`, `query_country()`
- `query_order_carriers()`, `query_order_histories()`, `query_order_state()`

## License

MIT License - See [LICENSE](LICENSE) file for details.
