Skip to main content

Installation

Install the ATP Protocol library to enable automatic payment processing for AI agent services on the Solana blockchain.

Prerequisites

  • Python 3.8 or higher
  • pip or uv package manager

Installation Methods

Using pip

Install the latest version of the ATP Protocol using pip:
pip3 install -U atp-protocol
Or using pip directly:
pip install -U atp-protocol

Using uv

If you’re using uv as your package manager:
uv pip install -U atp-protocol
Or add it to your project dependencies:
uv pip install atp-protocol

Verify Installation

After installation, verify that the package is installed correctly:
python3 -c "import atp; print(atp.__version__)"
Or check the installed packages:
pip3 show atp-protocol

Quick Start

Once installed, you can start using the ATP Protocol:
from atp.client import ATPClient
from atp.middleware import ATPSettlementMiddleware
from atp.schemas import PaymentToken

# Your ATP code here

Troubleshooting

Installation Issues

If you encounter permission errors during installation:
pip3 install -U --user atp-protocol
Or use a virtual environment:
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip3 install -U atp-protocol

Version Conflicts

If you experience version conflicts, try installing in a fresh virtual environment or check for conflicting dependencies.

uv Installation Issues

If uv is not installed, you can install it first:
curl -LsSf https://astral.sh/uv/install.sh | sh
Or using pip:
pip install uv