[build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "claude-agent-sdk" version = "0.2.179" description = "Python SDK for Claude Code" readme = "README.md" requires-python = ">=3.10" license = {text = "MIT"} authors = [ {name = "Anthropic", email = "support@anthropic.com"}, ] classifiers = [ "Development Status :: 3 - Alpha", "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", "Programming Language :: Python :: 3.13", "Typing :: Typed", ] keywords = ["claude", "ai", "sdk", "anthropic"] dependencies = [ "anyio>=4.0.0", "sniffio>=1.0.0", "typing_extensions>=4.0.0; python_version<'3.11'", "mcp>=1.23.0,<3.0.0", "jsonschema>=4.20.0", ] [project.optional-dependencies] dev = [ "pytest>=7.0.0", "anyio[trio]>=4.0.0", "pytest-cov>=4.0.0", "mypy>=1.0.0", "ruff>=0.1.0", ] otel = [ "opentelemetry-api>=1.20.0", ] examples = [ # Backend clients for the SessionStore reference adapters under # examples/session_stores/. The corresponding tests importorskip on # these so default CI is unaffected if this group isn't installed. "boto3>=1.28.0", "moto[s3]>=5.0.0", "redis>=4.2.0", "fakeredis>=2.20.0", "asyncpg>=0.27.0", ] [project.urls] Homepage = "https://github.com/anthropics/claude-agent-sdk-python" Documentation = "https://docs.anthropic.com/en/docs/claude-code/sdk" Issues = "https://github.com/anthropics/claude-agent-sdk-python/issues" [tool.hatch.build.targets.wheel] packages = ["src/claude_agent_sdk"] only-include = ["src/claude_agent_sdk"] [tool.hatch.build.targets.sdist] include = [ "/src", "/tests", # tests/test_build_wheel.py, test_download_cli.py and test_update_cli_version.py # load their subject out of scripts/ at import time, so an sdist that ships # /tests without /scripts cannot even collect its own test suite. "/scripts", "/examples", "/README.md", "/LICENSE", ] [tool.pytest.ini_options] testpaths = ["tests"] pythonpath = ["src"] addopts = [ "--import-mode=importlib", "-p", "anyio", ] [tool.mypy] python_version = "3.10" strict = true warn_return_any = true warn_unused_configs = true disallow_untyped_defs = true disallow_incomplete_defs = true check_untyped_defs = true disallow_untyped_decorators = true no_implicit_optional = true warn_redundant_casts = true warn_unused_ignores = true warn_no_return = true warn_unreachable = true strict_equality = true [[tool.mypy.overrides]] # opentelemetry-api is an optional dependency (the [otel] extra); the # import in subprocess_cli.py is guarded by try/except ImportError. module = ["opentelemetry", "opentelemetry.*"] ignore_missing_imports = true [[tool.mypy.overrides]] # jsonschema ships without type information or a py.typed marker. module = ["jsonschema", "jsonschema.*"] ignore_missing_imports = true [[tool.mypy.overrides]] # twine is not a declared dependency (not even in the [dev] extra); the # import in scripts/build_wheel.py is guarded by try/except ImportError. module = ["twine"] ignore_missing_imports = true [[tool.mypy.overrides]] # zopfli is installed only by the wheel-building workflows (pinned in # scripts/requirements-recompress.txt); build_wheel.py imports it only for # --recompress zopfli. It ships without type information. module = ["zopfli", "zopfli.*"] ignore_missing_imports = true [tool.ruff] target-version = "py310" line-length = 88 [tool.ruff.lint] select = [ "E", # pycodestyle errors "W", # pycodestyle warnings "F", # pyflakes "I", # isort "N", # pep8-naming "UP", # pyupgrade "B", # flake8-bugbear "C4", # flake8-comprehensions "PTH", # flake8-use-pathlib "SIM", # flake8-simplify ] ignore = [ "E501", # line too long (handled by formatter) ] [tool.ruff.lint.isort] known-first-party = ["claude_agent_sdk"]