agentpay-python 0.1.1__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,78 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentpay-python
3
+ Version: 0.1.2
4
+ Summary: AgentPay Python SDK — Lightning Network payments for AI agents
5
+ Author-email: AIPP <aippcore@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://api.aipp.dev
8
+ Project-URL: Source, https://github.com/aippdev/agentpay-python
9
+ Project-URL: Documentation, https://api.aipp.dev/docs
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Classifier: Topic :: Internet :: WWW/HTTP
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+ Requires-Dist: httpx>=0.25.0
23
+
24
+ # AgentPay Python SDK
25
+
26
+ Lightning Network payment infrastructure for AI agents. L402 paywall, credit management, and idempotent spending — in one clean SDK.
27
+
28
+ ## Installation
29
+
30
+ ```bash
31
+ pip install agentpay-python
32
+ ```
33
+
34
+ ## Quickstart
35
+
36
+ ```python
37
+ from agentpay import AgentPayClient
38
+
39
+ # Get an API key (50 free credits on signup)
40
+ client = AgentPayClient(api_key="sg_...")
41
+ bal = client.get_balance()
42
+ print(f"Balance: {bal.credits_remaining} credits")
43
+
44
+ # Spend credits (idempotent — safe to retry)
45
+ result = client.spend(amount=5.0, description="AI call")
46
+ print(f"Spent: {result.credits_used}, Remaining: {result.credits_remaining}")
47
+
48
+ # Usage forecast
49
+ forecast = client.forecast(estimated_cost_per_call=0.05)
50
+ if forecast.will_exhaust:
51
+ print("Credits running low!")
52
+ print(f"Estimated calls remaining: {forecast.estimated_calls_remaining}")
53
+
54
+ # L402 Paywall — generate Lightning invoice
55
+ pw = client.generate_paywall(amount=10.0, description="Premium content")
56
+ print(f"Invoice: {pw.invoice}")
57
+
58
+ # Topup — purchase more credits
59
+ top = client.topup(usd_amount=5.0)
60
+ print(f"Topup invoice: {top.invoice}")
61
+ ```
62
+
63
+ ## API Reference
64
+
65
+ Full API documentation: [api.aipp.dev/docs](https://api.aipp.dev/docs)
66
+
67
+ ## Features
68
+
69
+ - **L402 Paywall** — Lightning-native paywall with macaroon tokens
70
+ - **Credit System** — Prepaid credits with spending limits
71
+ - **Idempotent Spending** — Safe retry, no double-charges
72
+ - **Usage Forecasting** — Predict when credits will run out
73
+ - **Rate Limiting** — IP + API key rate limits
74
+ - **LNURL Auth** — Login with your Lightning wallet
75
+
76
+ ## License
77
+
78
+ MIT — use it, ship it, build on it.
@@ -0,0 +1,55 @@
1
+ # AgentPay Python SDK
2
+
3
+ Lightning Network payment infrastructure for AI agents. L402 paywall, credit management, and idempotent spending — in one clean SDK.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install agentpay-python
9
+ ```
10
+
11
+ ## Quickstart
12
+
13
+ ```python
14
+ from agentpay import AgentPayClient
15
+
16
+ # Get an API key (50 free credits on signup)
17
+ client = AgentPayClient(api_key="sg_...")
18
+ bal = client.get_balance()
19
+ print(f"Balance: {bal.credits_remaining} credits")
20
+
21
+ # Spend credits (idempotent — safe to retry)
22
+ result = client.spend(amount=5.0, description="AI call")
23
+ print(f"Spent: {result.credits_used}, Remaining: {result.credits_remaining}")
24
+
25
+ # Usage forecast
26
+ forecast = client.forecast(estimated_cost_per_call=0.05)
27
+ if forecast.will_exhaust:
28
+ print("Credits running low!")
29
+ print(f"Estimated calls remaining: {forecast.estimated_calls_remaining}")
30
+
31
+ # L402 Paywall — generate Lightning invoice
32
+ pw = client.generate_paywall(amount=10.0, description="Premium content")
33
+ print(f"Invoice: {pw.invoice}")
34
+
35
+ # Topup — purchase more credits
36
+ top = client.topup(usd_amount=5.0)
37
+ print(f"Topup invoice: {top.invoice}")
38
+ ```
39
+
40
+ ## API Reference
41
+
42
+ Full API documentation: [api.aipp.dev/docs](https://api.aipp.dev/docs)
43
+
44
+ ## Features
45
+
46
+ - **L402 Paywall** — Lightning-native paywall with macaroon tokens
47
+ - **Credit System** — Prepaid credits with spending limits
48
+ - **Idempotent Spending** — Safe retry, no double-charges
49
+ - **Usage Forecasting** — Predict when credits will run out
50
+ - **Rate Limiting** — IP + API key rate limits
51
+ - **LNURL Auth** — Login with your Lightning wallet
52
+
53
+ ## License
54
+
55
+ MIT — use it, ship it, build on it.
@@ -0,0 +1,78 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentpay-python
3
+ Version: 0.1.2
4
+ Summary: AgentPay Python SDK — Lightning Network payments for AI agents
5
+ Author-email: AIPP <aippcore@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://api.aipp.dev
8
+ Project-URL: Source, https://github.com/aippdev/agentpay-python
9
+ Project-URL: Documentation, https://api.aipp.dev/docs
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Classifier: Topic :: Internet :: WWW/HTTP
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+ Requires-Dist: httpx>=0.25.0
23
+
24
+ # AgentPay Python SDK
25
+
26
+ Lightning Network payment infrastructure for AI agents. L402 paywall, credit management, and idempotent spending — in one clean SDK.
27
+
28
+ ## Installation
29
+
30
+ ```bash
31
+ pip install agentpay-python
32
+ ```
33
+
34
+ ## Quickstart
35
+
36
+ ```python
37
+ from agentpay import AgentPayClient
38
+
39
+ # Get an API key (50 free credits on signup)
40
+ client = AgentPayClient(api_key="sg_...")
41
+ bal = client.get_balance()
42
+ print(f"Balance: {bal.credits_remaining} credits")
43
+
44
+ # Spend credits (idempotent — safe to retry)
45
+ result = client.spend(amount=5.0, description="AI call")
46
+ print(f"Spent: {result.credits_used}, Remaining: {result.credits_remaining}")
47
+
48
+ # Usage forecast
49
+ forecast = client.forecast(estimated_cost_per_call=0.05)
50
+ if forecast.will_exhaust:
51
+ print("Credits running low!")
52
+ print(f"Estimated calls remaining: {forecast.estimated_calls_remaining}")
53
+
54
+ # L402 Paywall — generate Lightning invoice
55
+ pw = client.generate_paywall(amount=10.0, description="Premium content")
56
+ print(f"Invoice: {pw.invoice}")
57
+
58
+ # Topup — purchase more credits
59
+ top = client.topup(usd_amount=5.0)
60
+ print(f"Topup invoice: {top.invoice}")
61
+ ```
62
+
63
+ ## API Reference
64
+
65
+ Full API documentation: [api.aipp.dev/docs](https://api.aipp.dev/docs)
66
+
67
+ ## Features
68
+
69
+ - **L402 Paywall** — Lightning-native paywall with macaroon tokens
70
+ - **Credit System** — Prepaid credits with spending limits
71
+ - **Idempotent Spending** — Safe retry, no double-charges
72
+ - **Usage Forecasting** — Predict when credits will run out
73
+ - **Rate Limiting** — IP + API key rate limits
74
+ - **LNURL Auth** — Login with your Lightning wallet
75
+
76
+ ## License
77
+
78
+ MIT — use it, ship it, build on it.
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "agentpay-python"
7
- version = "0.1.1"
8
- description = "AgentPay Python SDK — AI agent ödeme altyapısı"
7
+ version = "0.1.2"
8
+ description = "AgentPay Python SDK — Lightning Network payments for AI agents"
9
9
  readme = "README.md"
10
10
  authors = [
11
11
  {name = "AIPP", email = "aippcore@gmail.com"},
@@ -1,65 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: agentpay-python
3
- Version: 0.1.1
4
- Summary: AgentPay Python SDK — AI agent ödeme altyapısı
5
- Author-email: AIPP <aippcore@gmail.com>
6
- License: MIT
7
- Project-URL: Homepage, https://api.aipp.dev
8
- Project-URL: Source, https://github.com/aippdev/agentpay-python
9
- Project-URL: Documentation, https://api.aipp.dev/docs
10
- Classifier: Development Status :: 4 - Beta
11
- Classifier: Intended Audience :: Developers
12
- Classifier: License :: OSI Approved :: MIT License
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.9
15
- Classifier: Programming Language :: Python :: 3.10
16
- Classifier: Programming Language :: Python :: 3.11
17
- Classifier: Programming Language :: Python :: 3.12
18
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
- Classifier: Topic :: Internet :: WWW/HTTP
20
- Requires-Python: >=3.9
21
- Description-Content-Type: text/markdown
22
- Requires-Dist: httpx>=0.25.0
23
-
24
- # AgentPay Python SDK
25
-
26
- AI agent'lar için Lightning Network tabanlı ödeme altyapısı.
27
-
28
- ## Kurulum
29
-
30
- ```bash
31
- pip install agentpay-sdk
32
- ```
33
-
34
- ## Kullanım
35
-
36
- ```python
37
- from agentpay import AgentPayClient
38
-
39
- # Yeni API key al (50 ücretsiz kredi ile)
40
- client = AgentPayClient(api_key="sg_...")
41
- bal = client.get_balance()
42
- print(f"Bakiye: {bal.credits_remaining} kredi")
43
-
44
- # Kredi harca (idempotent)
45
- result = client.spend(amount=5.0, description="AI çağrısı")
46
- print(f"Harcandı: {result.credits_used}, Kalan: {result.credits_remaining}")
47
-
48
- # Bakiye tahmini
49
- forecast = client.forecast(estimated_cost_per_call=0.05)
50
- if forecast.will_exhaust:
51
- print("Bakiye azalıyor!")
52
- print(f"Tahmini çağrı: {forecast.estimated_calls_remaining}")
53
-
54
- # Paywall (L402) — LN faturası ile ödeme
55
- pw = client.generate_paywall(amount=10.0, description="Premium içerik")
56
- print(f"Fatura: {pw.invoice}")
57
-
58
- # Topup — kredi yükle
59
- top = client.topup(usd_amount=5.0)
60
- print(f"Yükleme faturası: {top.invoice}")
61
- ```
62
-
63
- ## API Referansı
64
-
65
- Tüm metodlar ve modeller için: [api.aipp.dev/docs](https://api.aipp.dev/docs)
@@ -1,42 +0,0 @@
1
- # AgentPay Python SDK
2
-
3
- AI agent'lar için Lightning Network tabanlı ödeme altyapısı.
4
-
5
- ## Kurulum
6
-
7
- ```bash
8
- pip install agentpay-sdk
9
- ```
10
-
11
- ## Kullanım
12
-
13
- ```python
14
- from agentpay import AgentPayClient
15
-
16
- # Yeni API key al (50 ücretsiz kredi ile)
17
- client = AgentPayClient(api_key="sg_...")
18
- bal = client.get_balance()
19
- print(f"Bakiye: {bal.credits_remaining} kredi")
20
-
21
- # Kredi harca (idempotent)
22
- result = client.spend(amount=5.0, description="AI çağrısı")
23
- print(f"Harcandı: {result.credits_used}, Kalan: {result.credits_remaining}")
24
-
25
- # Bakiye tahmini
26
- forecast = client.forecast(estimated_cost_per_call=0.05)
27
- if forecast.will_exhaust:
28
- print("Bakiye azalıyor!")
29
- print(f"Tahmini çağrı: {forecast.estimated_calls_remaining}")
30
-
31
- # Paywall (L402) — LN faturası ile ödeme
32
- pw = client.generate_paywall(amount=10.0, description="Premium içerik")
33
- print(f"Fatura: {pw.invoice}")
34
-
35
- # Topup — kredi yükle
36
- top = client.topup(usd_amount=5.0)
37
- print(f"Yükleme faturası: {top.invoice}")
38
- ```
39
-
40
- ## API Referansı
41
-
42
- Tüm metodlar ve modeller için: [api.aipp.dev/docs](https://api.aipp.dev/docs)
@@ -1,65 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: agentpay-python
3
- Version: 0.1.1
4
- Summary: AgentPay Python SDK — AI agent ödeme altyapısı
5
- Author-email: AIPP <aippcore@gmail.com>
6
- License: MIT
7
- Project-URL: Homepage, https://api.aipp.dev
8
- Project-URL: Source, https://github.com/aippdev/agentpay-python
9
- Project-URL: Documentation, https://api.aipp.dev/docs
10
- Classifier: Development Status :: 4 - Beta
11
- Classifier: Intended Audience :: Developers
12
- Classifier: License :: OSI Approved :: MIT License
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.9
15
- Classifier: Programming Language :: Python :: 3.10
16
- Classifier: Programming Language :: Python :: 3.11
17
- Classifier: Programming Language :: Python :: 3.12
18
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
- Classifier: Topic :: Internet :: WWW/HTTP
20
- Requires-Python: >=3.9
21
- Description-Content-Type: text/markdown
22
- Requires-Dist: httpx>=0.25.0
23
-
24
- # AgentPay Python SDK
25
-
26
- AI agent'lar için Lightning Network tabanlı ödeme altyapısı.
27
-
28
- ## Kurulum
29
-
30
- ```bash
31
- pip install agentpay-sdk
32
- ```
33
-
34
- ## Kullanım
35
-
36
- ```python
37
- from agentpay import AgentPayClient
38
-
39
- # Yeni API key al (50 ücretsiz kredi ile)
40
- client = AgentPayClient(api_key="sg_...")
41
- bal = client.get_balance()
42
- print(f"Bakiye: {bal.credits_remaining} kredi")
43
-
44
- # Kredi harca (idempotent)
45
- result = client.spend(amount=5.0, description="AI çağrısı")
46
- print(f"Harcandı: {result.credits_used}, Kalan: {result.credits_remaining}")
47
-
48
- # Bakiye tahmini
49
- forecast = client.forecast(estimated_cost_per_call=0.05)
50
- if forecast.will_exhaust:
51
- print("Bakiye azalıyor!")
52
- print(f"Tahmini çağrı: {forecast.estimated_calls_remaining}")
53
-
54
- # Paywall (L402) — LN faturası ile ödeme
55
- pw = client.generate_paywall(amount=10.0, description="Premium içerik")
56
- print(f"Fatura: {pw.invoice}")
57
-
58
- # Topup — kredi yükle
59
- top = client.topup(usd_amount=5.0)
60
- print(f"Yükleme faturası: {top.invoice}")
61
- ```
62
-
63
- ## API Referansı
64
-
65
- Tüm metodlar ve modeller için: [api.aipp.dev/docs](https://api.aipp.dev/docs)