Skip to main content

Python SDK for ampersend

Project description

ampersend-sdk

Python SDK for integrating x402 payment capabilities into A2A (Agent-to-Agent) protocol applications.

Quick Start

from ampersend_sdk.a2a.client import X402RemoteA2aAgent
from ampersend_sdk.x402.treasurers.naive import NaiveTreasurer
from ampersend_sdk.x402.wallets.account import AccountWallet

wallet = AccountWallet(private_key="0x...")
treasurer = NaiveTreasurer(wallet)

agent = X402RemoteA2aAgent(
    treasurer=treasurer,
    agent_url="http://localhost:8001",
    agent_name="SellerAgent"
)

result = await agent.run("your query")

Package Structure

ampersend_sdk/
├── a2a/
│   ├── client/          # Client-side x402 support
│   └── server/          # Server-side x402 support
└── x402/                # Core x402 components
    ├── treasurer.py
    └── wallets/         # EOA & Smart Account wallets

Documentation

Complete Python SDK Documentation

Development

# Test
uv run -- pytest

# Lint & format
uv run -- ruff check python
uv run -- ruff format python

# Type check
uv run -- mypy python

Learn More

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

ampersend_sdk-0.0.1a1.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

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

ampersend_sdk-0.0.1a1-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

Details for the file ampersend_sdk-0.0.1a1.tar.gz.

File metadata

  • Download URL: ampersend_sdk-0.0.1a1.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ampersend_sdk-0.0.1a1.tar.gz
Algorithm Hash digest
SHA256 02b8679fd12995f5bdc423e4801a21b730d2d1baad257c9a865056191dda4bf0
MD5 bd7e977121b890764ae3afa4a8a2129e
BLAKE2b-256 2930be700c650ec62766c655544db005ac2fd38d439533f8c616993ab068bfb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for ampersend_sdk-0.0.1a1.tar.gz:

Publisher: python-release.yml on edgeandnode/ampersend-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ampersend_sdk-0.0.1a1-py3-none-any.whl.

File metadata

File hashes

Hashes for ampersend_sdk-0.0.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 d99084c000aac1fc4cbea782ba1c3a8aac5da648a6c6b1d3fe0f0385c2b5d895
MD5 10808900674aa12086319204072d4d5f
BLAKE2b-256 efce2917efde7440ad74180542601e8e8ca192af04976e748389c16fa1f751ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for ampersend_sdk-0.0.1a1-py3-none-any.whl:

Publisher: python-release.yml on edgeandnode/ampersend-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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