{"repo":"Fewsats/fewsats-python","free":true,"listed":false,"github":"https://github.com/Fewsats/fewsats-python","clone":"git clone https://github.com/Fewsats/fewsats-python.git","description":"Python SDK for Fewsats","language":"Jupyter Notebook","stars":13,"topics":["agents","ai","llm-agents","payments","python"],"license":"Apache-2.0","category":"ai-agents","readme_excerpt":"fewsats This library enables AI agents to handle real-world payments autonomously. It provides a simple interface for AI systems to manage payment methods, process transactions, and interact with L402 paywalls. The library provides two main interfaces: 1. Direct payment handling through the Python SDK 2. AI-native tools through as tools() for autonomous agents Install Install latest from pypi Getting Started The library provides a Fewsats class to handle payments. You can use handle them manually or use the as tools() method to create tools for autonomous agents. Making Payments Obtain information about your account and perform payments: ([{'id': 1, 'last4': '4242', 'brand': 'visa', 'exp month': 12, 'exp year': 2034, 'is default': False}, {'id': 4, 'last4': '4242', 'brand': 'Visa', 'exp month': 12, 'exp year': 2034, 'is default': True}], [{'id': 1, 'balance': 4421, 'currency': 'usd'}], {'name': 'Pol', 'last name': 'Alvarez Vecino', 'email': 'pol@fewsats.com', 'billing info': None, 'id': 1, 'created at': '2024-08-20T16:13:01.255Z', 'webhook url': 'https://example.com'}) The pay method uses the information returned by a L402 Protocol 402 Payment Required response to submit a payment. The L402 flow is handled by the backend. By default it will also choose the most convenient payment method, and assume you want to pay the first offer if multiple are available. {'id': 164, 'created at': '2025-03-10T14:53:03.282Z', 'status': 'success', 'payment method': 'lightning'} Fewsats also su","default_branch":null,"files":null,"tree":[],"storefront":"/r/Fewsats","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Fewsats/fewsats-python/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}