Metadata-Version: 2.4
Name: agentpay-python
Version: 0.1.1
Summary: AgentPay Python SDK — AI agent ödeme altyapısı
Author-email: AIPP <aippcore@gmail.com>
License: MIT
Project-URL: Homepage, https://api.aipp.dev
Project-URL: Source, https://github.com/aippdev/agentpay-python
Project-URL: Documentation, https://api.aipp.dev/docs
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
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: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.25.0

# AgentPay Python SDK

AI agent'lar için Lightning Network tabanlı ödeme altyapısı.

## Kurulum

```bash
pip install agentpay-sdk
```

## Kullanım

```python
from agentpay import AgentPayClient

# Yeni API key al (50 ücretsiz kredi ile)
client = AgentPayClient(api_key="sg_...")
bal = client.get_balance()
print(f"Bakiye: {bal.credits_remaining} kredi")

# Kredi harca (idempotent)
result = client.spend(amount=5.0, description="AI çağrısı")
print(f"Harcandı: {result.credits_used}, Kalan: {result.credits_remaining}")

# Bakiye tahmini
forecast = client.forecast(estimated_cost_per_call=0.05)
if forecast.will_exhaust:
    print("Bakiye azalıyor!")
print(f"Tahmini çağrı: {forecast.estimated_calls_remaining}")

# Paywall (L402) — LN faturası ile ödeme
pw = client.generate_paywall(amount=10.0, description="Premium içerik")
print(f"Fatura: {pw.invoice}")

# Topup — kredi yükle
top = client.topup(usd_amount=5.0)
print(f"Yükleme faturası: {top.invoice}")
```

## API Referansı

Tüm metodlar ve modeller için: [api.aipp.dev/docs](https://api.aipp.dev/docs)
