Examples for the x402 Python SDK.
cd clients/httpx
cp .env-local .env
# Edit .env with your EVM_PRIVATE_KEY and/or SVM_PRIVATE_KEY
uv sync
uv run python main.py- clients/httpx/ - Async HTTP client with httpx
- clients/requests/ - Sync HTTP client with requests
- clients/custom/ - Manual payment handling
- clients/advanced/ - Hooks, selectors, and builder patterns
- servers/fastapi/ - FastAPI server with payment middleware
- servers/flask/ - Flask server with payment middleware
- servers/custom/ - Manual payment handling
- servers/advanced/ - Dynamic pricing, hooks, and more
- facilitator/ - Payment facilitator service
- legacy/ - V1 SDK examples (for backward compatibility)