[project]
name = "2sio"
version = "1.31.0"
description = "Python client for 2s — the (most) everything API. Pay-per-call AI-agent data APIs, settled in USDC on Base or Solana via x402."
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
authors = [{ name = "Josh Alley", email = "josh@alley.io" }]
keywords = [
    "x402",
    "ai-agents",
    "agentic",
    "usdc",
    "base",
    "pay-per-call",
    "2s.io",
    "stablecoin",
]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Topic :: Internet :: WWW/HTTP",
]
dependencies = [
    "httpx>=0.27",
    "eth-account>=0.13",
    # Both x402 extras are needed: [httpx] for the transport adapter used in
    # our client core, [evm] for the EVM signer wrapper (which imports web3).
    # Without [evm], `pip install 2sio` succeeds but the very first paid call
    # raises `ModuleNotFoundError: No module named 'web3'` from inside
    # x402.mechanisms.evm.signers. We're x402-only, so EVM is mandatory.
    "x402[httpx,evm]>=2.0",
]

[project.optional-dependencies]
# Solana USDC rail: TwoS(solana_private_key=...). Pulls solana/solders via
# the x402 SDK's svm extra. Optional so EVM-only users skip the heavy deps.
svm = ["x402[svm]>=2.12"]

[project.urls]
Homepage = "https://2s.io"
Source = "https://github.com/2s-io/sdk"
Issues = "https://github.com/2s-io/sdk/issues"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["src/twosio"]
