Metadata-Version: 2.4
Name: paddle-sdk
Version: 0.1.6
Summary: Deprecated: Use `paddle.py` instead: https://pypi.org/project/paddle.py/
Author-email: CCXLV <mereba2627@gmail.com>
License: MIT License
        
        Copyright (c) 2024 CCXLV
        
        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.
        
Keywords: paddle,api,wrapper,sdk,async,types
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.28.1
Requires-Dist: pydantic>=2.10.2
Provides-Extra: dev
Requires-Dist: setuptools; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pytest-mock; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Dynamic: license-file

# Paddle SDK

> [!WARNING]
> The `paddle` module is deprecated and will be removed in a future version. Please use `paddle.py` instead. You will see a deprecation warning when using the old module.

A modern Python SDK for Paddle's API with type hints and async support.

<p align="center">
  <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
  <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.8%2B-blue" alt="Python Version"></a>
  <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black"></a>
</p>

## Features

- 🚀 Synchronous and asynchronous client implementations
- 📦 Support for Paddle's API (in development)
- 🧩 Type hints throughout the codebase
- 🔄 Automatic retry mechanism for failed requests
- 🔧 Environment configuration (Sandbox/Production)
- 🛡️ Comprehensive error handling
- 📊 Extensive test coverage

## Installation

```bash
pip install paddle-sdk
```

## Quick Start

### Synchronous Client

```python
from paddle import Client, Environment

# Initialize the client
client = Client(
    api_key="API_KEY",
    environment=Environment.SANDBOX  # or Environment.PRODUCTION
)

# List products
products = client.products.list()
print(products)

# Get a specific product
product = client.products.get(product_id="pro_123456789")
print(product)
```

### Asynchronous Client

```python
import asyncio

from paddle.aio import AsyncClient
from paddle import Environment


async def main():
    async with AsyncClient(
        api_key="API_KEY",
        environment=Environment.SANDBOX,  # or Environment.PRODUCTION
    ) as client:
        # List products
        all_products = await client.products.list()
        print(all_products)

        # Get a product
        product = await client.products.get("pro_123456789")
        print(product)


if __name__ == "__main__":
    asyncio.run(main())
```

## Development

### Setup

1. Clone the repository:

```bash
git clone https://github.com/CCXLV/paddle-sdk.git
cd paddle-sdk
```

2. Create a virtual environment:

```bash
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
```

3. Install development dependencies:

```bash
pip install -e .[dev]
```

### Running Tests

```bash
# Run all tests
pytest

# Run with coverage
pytest --cov=paddle
```

## Contributing

For detailed information on how to contribute to this project, please see our [Contributing Guidelines](CONTRIBUTING.md).

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Roadmap

See the [CHANGELOG.md](CHANGELOG.md) for planned API endpoints and features.
