Metadata-Version: 2.4
Name: rencom
Version: 0.1.1
Summary: Official Python SDK for the Rencom API - unified search for x402 resources and UCP merchants
Project-URL: Homepage, https://github.com/rencom-ai/rencom-sdk-python
Project-URL: Documentation, https://rencom-sdk-python.readthedocs.io
Project-URL: Repository, https://github.com/rencom-ai/rencom-sdk-python
Project-URL: Issues, https://github.com/rencom-ai/rencom-sdk-python/issues
Project-URL: Changelog, https://github.com/rencom-ai/rencom-sdk-python/blob/main/CHANGELOG.md
Author-email: Rencom <developers@rencom.ai>
License: MIT
License-File: LICENSE
Keywords: api,blockchain,rencom,sdk,search,ucp,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
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: email-validator>=2.3.0
Requires-Dist: httpx[http2]>=0.27.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: ruff>=0.14.14
Requires-Dist: typing-extensions>=4.5.0; python_version < '3.11'
Provides-Extra: all
Requires-Dist: mkdocs-material>=9.5.0; extra == 'all'
Requires-Dist: mkdocs>=1.5.0; extra == 'all'
Requires-Dist: mkdocstrings[python]>=0.24.0; extra == 'all'
Requires-Dist: mypy>=1.8.0; extra == 'all'
Requires-Dist: pre-commit>=4.0.0; extra == 'all'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'all'
Requires-Dist: pytest-cov>=4.1.0; extra == 'all'
Requires-Dist: pytest>=8.0.0; extra == 'all'
Requires-Dist: respx>=0.21.0; extra == 'all'
Requires-Dist: rich>=13.0.0; extra == 'all'
Requires-Dist: ruff>=0.1.0; extra == 'all'
Requires-Dist: typer>=0.9.0; extra == 'all'
Requires-Dist: vcrpy>=6.0.0; extra == 'all'
Requires-Dist: x402[evm]>=2.0.0; extra == 'all'
Provides-Extra: cli
Requires-Dist: rich>=13.0.0; extra == 'cli'
Requires-Dist: typer>=0.9.0; extra == 'cli'
Provides-Extra: dev
Requires-Dist: mypy>=1.8.0; extra == 'dev'
Requires-Dist: pre-commit>=4.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: respx>=0.21.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Requires-Dist: vcrpy>=6.0.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.5.0; extra == 'docs'
Requires-Dist: mkdocs>=1.5.0; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.24.0; extra == 'docs'
Provides-Extra: x402
Requires-Dist: x402[evm]>=2.0.0; extra == 'x402'
Description-Content-Type: text/markdown

# Rencom Python SDK

Official Python SDK for the Rencom API.

[![PyPI](https://img.shields.io/pypi/v/rencom.svg)](https://pypi.org/project/rencom/)
[![Python Versions](https://img.shields.io/pypi/pyversions/rencom.svg)](https://pypi.org/project/rencom/)
[![License](https://img.shields.io/github/license/rencom-ai/rencom-sdk-python.svg)](https://github.com/rencom-ai/rencom-sdk-python/blob/main/LICENSE)

## Installation

```bash
pip install rencom
```

For x402 payment support:

```bash
pip install rencom[x402]
```

## Quick Start

```python
import asyncio
from rencom import AsyncRencomClient

async def main():
    async with AsyncRencomClient(api_key="rn_...") as client:
        # Search x402 resources
        results = await client.x402.search("trading api")
        for result in results.results:
            print(f"{result.resource}: {result.description}")

        # Search UCP merchants
        merchants = await client.ucp.merchants.search(industry="retail")
        for merchant in merchants.results:
            print(f"{merchant.name}: {merchant.domain}")

asyncio.run(main())
```

## Authentication

The SDK supports multiple authentication methods:

**API Key** (recommended):
```python
client = AsyncRencomClient(api_key="rn_...")
```

**Environment Variable**:
```bash
export RENCOM_API_KEY="rn_..."
```
```python
client = AsyncRencomClient()  # Auto-loads from environment
```

**JWT Token**:
```python
client = AsyncRencomClient(jwt_token="eyJ...")
```

## Features

- x402 resource search - discover APIs that accept blockchain payments
- UCP merchant discovery - find merchants and products on the Universal Commerce Protocol
- Fully typed with Pydantic models
- Built-in pagination support
- Async/await support via httpx
- Session tracking and analytics

## Documentation

Full documentation is available at https://rencom-sdk-python.readthedocs.io

See the [examples/](./examples) directory for more usage examples.

## Development

```bash
git clone https://github.com/rencom-ai/rencom-sdk-python.git
cd rencom-sdk-python
pip install -e ".[dev]"
```

Run tests:
```bash
pytest
```

The SDK auto-generates models from the OpenAPI specification:
```bash
python scripts/generate.py
```

Note: Files in `rencom/_generated/` are auto-generated and should not be edited manually.

## License

MIT License - see [LICENSE](./LICENSE) for details.
