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

# agent.py
import os
from ampersend_sdk import create_ampersend_treasurer
from ampersend_sdk.a2a.client import X402RemoteA2aAgent

treasurer = create_ampersend_treasurer(
    smart_account_address=os.environ["SMART_ACCOUNT_ADDRESS"],
    session_key_private_key=os.environ["SESSION_KEY_PRIVATE_KEY"],
)

root_agent = X402RemoteA2aAgent(
    treasurer=treasurer,
    name="my_agent",
    agent_card="https://agent.example.com/.well-known/agent-card.json",
)

Run with ADK: adk run agent.py

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.21.tar.gz (29.0 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.21-py3-none-any.whl (48.7 kB view details)

Uploaded Python 3

File details

Details for the file ampersend_sdk-0.0.21.tar.gz.

File metadata

  • Download URL: ampersend_sdk-0.0.21.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ampersend_sdk-0.0.21.tar.gz
Algorithm Hash digest
SHA256 128fc393bc4f445f5eaf15ed00e9c2e0181d9a3540da2775c2e080041dc253f5
MD5 dfd6928fc5da2a9d960a4d3375ab3a23
BLAKE2b-256 8fb6c6cf53fdaae8c49ecbc9b5c5184d6ce20ea93a772baa8dc825db94277fca

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ampersend_sdk-0.0.21-py3-none-any.whl
  • Upload date:
  • Size: 48.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ampersend_sdk-0.0.21-py3-none-any.whl
Algorithm Hash digest
SHA256 950583cafc1d7ac1de9e81da6c460526931fefacd421499a922b3d94566cdb5f
MD5 4f9c89304fe1e1045b6fd1c886ec96b6
BLAKE2b-256 f17a053b446aaa80cb045fb630401258a038483eff498b7314de01dcfead6c9b

See more details on using hashes here.

Provenance

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