Metadata-Version: 2.1
Name: tvm-x402
Version: 0.1.1
Summary: x402 Payment Protocol SDK for Python
Project-URL: Homepage, https://github.com/sun-protocol/tvm-x402
Project-URL: Documentation, https://github.com/sun-protocol/tvm-x402#readme
Project-URL: Repository, https://github.com/sun-protocol/tvm-x402
Author-email: x402 <dev@x402.io>
License: MIT
Keywords: blockchain,payment,tron,x402
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: httpx>=0.25.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: all
Requires-Dist: fastapi>=0.100.0; extra == 'all'
Requires-Dist: flask>=2.0.0; extra == 'all'
Requires-Dist: tronpy>=0.4.0; extra == 'all'
Provides-Extra: dev
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Provides-Extra: fastapi
Requires-Dist: fastapi>=0.100.0; extra == 'fastapi'
Provides-Extra: flask
Requires-Dist: flask>=2.0.0; extra == 'flask'
Provides-Extra: tron
Requires-Dist: tronpy>=0.4.0; extra == 'tron'
Description-Content-Type: text/markdown

# tvm-x402

Python SDK for the x402 payment protocol (TRON-only).

## Installation

```bash
pip install tvm-x402
```

Optional extras:

```bash
pip install "tvm-x402[tron]"
pip install "tvm-x402[fastapi]"
pip install "tvm-x402[flask]"
pip install "tvm-x402[all]"
```

## Quick Start

```python
from x402.clients import X402Client

client = X402Client()
```

If you want automatic handling of HTTP 402 responses, use `X402HttpClient`:

```python
import httpx

from x402.clients import X402Client, X402HttpClient

x402_client = X402Client()
http_client = httpx.AsyncClient()
client = X402HttpClient(http_client=http_client, x402_client=x402_client)
```

## Links

- Repository: https://github.com/sun-protocol/tvm-x402
- Issues: https://github.com/sun-protocol/tvm-x402/issues
