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.1a2.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.1a2-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ampersend_sdk-0.0.1a2.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.1a2.tar.gz
Algorithm Hash digest
SHA256 c3cf9057cb7263861b71fd609bbee94d70c66fa68c3356d00bb47a10ba35dac7
MD5 86960cf555b36000ddfe781b129ba2e0
BLAKE2b-256 3f88c76750837a831328fa635787423670be32da5269dbf4ccc3271d006ac3fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for ampersend_sdk-0.0.1a2.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.1a2-py3-none-any.whl.

File metadata

File hashes

Hashes for ampersend_sdk-0.0.1a2-py3-none-any.whl
Algorithm Hash digest
SHA256 ab4d4be49514f9f914efba6f930f6597efa078e892a184e49eda08ce2c4cc3e0
MD5 aeb912f2458f78b13d9be6a8fd304c58
BLAKE2b-256 3ad93017eb91fcbef1f5e3efe48635d93c235235881c783202a7371f7e59abb0

See more details on using hashes here.

Provenance

The following attestation bundles were made for ampersend_sdk-0.0.1a2-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