Skip to main content

Official Python SDK for the Rencom API - unified search for x402 resources and UCP merchants

Project description

Rencom Python SDK

Official Python SDK for the Rencom API - unified search for x402 resources and UCP merchants.

PyPI Python Versions License Tests

Features

  • 🔍 x402 Resource Search - Discover APIs that accept blockchain payments
  • 🏪 UCP Merchant Discovery - Find merchants and products on the Universal Commerce Protocol
  • 🔐 Multiple Auth Methods - API keys, JWT, x402 payments
  • 📊 Built-in Analytics - Session tracking and click logging
  • Async First - Built on httpx with full async/await support
  • 🛡️ Type Safe - Fully typed with Pydantic models
  • 🔄 Auto-pagination - Iterate through large result sets effortlessly

Installation

pip install rencom

Optional Dependencies

# CLI tools
pip install rencom[cli]

# x402 payment support
pip install rencom[x402]

# Development dependencies
pip install rencom[dev]

Quick Start

import asyncio
from rencom import AsyncRencomClient

async def main():
    # Initialize client with API key
    async with AsyncRencomClient(api_key="rk_...") as client:
        # Search x402 resources
        results = await client.x402.search("weather 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}")

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

Documentation

Authentication

API Key (Recommended)

from rencom import AsyncRencomClient

client = AsyncRencomClient(api_key="rk_...")

Environment Variable

export RENCOM_API_KEY="rk_..."
client = AsyncRencomClient()  # Auto-loads from env

JWT Token

# After email verification
client = AsyncRencomClient(jwt_token="eyJ...")

Usage Examples

See the examples/ directory for full working examples.

Development

Setup

git clone https://github.com/rencom-ai/rencom-sdk-python.git
cd rencom-sdk-python

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install with dev dependencies
pip install -e ".[dev]"

# Install pre-commit hooks
pre-commit install

Testing

# Run all tests
pytest

# Run only unit tests (fast)
pytest -m unit

# Run with coverage
pytest --cov=rencom --cov-report=html

Code Generation

The SDK auto-generates code from the OpenAPI specification:

python scripts/generate.py

Important: Never edit files in rencom/_generated/ manually - they will be overwritten.

Contributing

Contributions are welcome! Please read CONTRIBUTING.md for guidelines.

License

MIT License - see LICENSE for details.

Support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rencom-0.1.0.tar.gz (26.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rencom-0.1.0-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file rencom-0.1.0.tar.gz.

File metadata

  • Download URL: rencom-0.1.0.tar.gz
  • Upload date:
  • Size: 26.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for rencom-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d019d0e565b10f287fecb7afc14d6b407691a30a119bb3dfb3709d313884b956
MD5 24fa235b91c70ef7a5bd51fb045c804f
BLAKE2b-256 bd9859b0df3f3dd0da587f568732898ee697084a1a88a6ef7c6e1302116d253e

See more details on using hashes here.

File details

Details for the file rencom-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rencom-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for rencom-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d844f8d51727cec3c59013b5c423fdb2c36603127a618cab819cc679baf3b837
MD5 2c326dcc086ca6034532d051e7035b08
BLAKE2b-256 ee8836b495499cd763fee298a9648ff8470466bac3ac0cafbde13f1f45d65376

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page