Metadata-Version: 2.4
Name: pyvelv
Version: 0.1.1
Summary: Async Python SDK for the Velvpay payment gateway
Author: Velvpay SDK Team
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: httpx (>=0.27.0)
Requires-Dist: pycryptodome (>=3.20.0)
Requires-Dist: pydantic (>=2.0)
Description-Content-Type: text/markdown

# Pyvelv

> Async Python SDK for the **Velvpay** payment gateway.

## Installation

```bash
pip install pyvelv
# or
poetry add pyvelv
```

## Quick Start

```python
import asyncio
from pyvelv import Velvpay
from pyvelv.models import CreatePaymentLinkRequest

async def main():
    async with Velvpay(secret_key="your-secret-key") as client:
        # Create a payment link
        response = await client.payment_links.create(
            CreatePaymentLinkRequest(
                amount=1500.00,
                currency="NGN",
                description="Order #12345",
            )
        )
        print(response.data.url)

        # Verify a transaction
        txn = await client.transactions.verify(reference="ref_abc123")
        print(txn.data.status)

asyncio.run(main())
```

## Authentication

Pyvelv handles authentication automatically. The SDK generates the required `api-key` header using a legacy OpenSSL `EVP_BytesToKey` routine (AES-256-CBC) with a random 8-byte salt on every request.

Simply pass your Velvpay secret key when initializing the client:

```python
client = Velvpay(secret_key="sk_live_...")
```

## Resources

| Resource              | Methods                        |
|-----------------------|--------------------------------|
| `payment_links`       | `create()`, `get()`, `list()`  |
| `transactions`        | `get()`, `list()`, `verify()`  |

## License

MIT

