Python 88.3%
TypeScript 7.6%
Shell 4.1%
1[build-system]2requires = ["hatchling", "hatch-fancy-pypi-readme"]3build-backend = "hatchling.build"45[project]6name = "xai-sdk"7dynamic = ["readme", "version"]8description = "The official Python SDK for the xAI API"9license = "Apache-2.0"10authors = [{ name = "xAI", email = "support@x.ai" }]11dependencies = [12 "grpcio>=1.72.1,<2",13 "protobuf>=5.29.4,<7",14 "googleapis-common-protos>=1.65.0,<2",15 "pydantic>=2.5.3,<3",16 "requests>=2.31.0,<3",17 "aiohttp>=3.8.6,<4",18 "packaging>=25.0,<26",19 "opentelemetry-sdk>=1.36.0,<2",20 "typing-extensions>=4.14.0,<5",21]22requires-python = ">=3.10"23classifiers = [24 "Development Status :: 5 - Production/Stable",25 "Environment :: Web Environment",26 "Intended Audience :: Developers",27 "Intended Audience :: Science/Research",28 "License :: OSI Approved :: Apache Software License",29 "Operating System :: MacOS :: MacOS X",30 "Operating System :: POSIX :: Linux",31 "Operating System :: Microsoft :: Windows",32 "Programming Language :: Python",33 "Programming Language :: Python :: 3.10",34 "Programming Language :: Python :: 3.11",35 "Programming Language :: Python :: 3.12",36 "Programming Language :: Python :: 3.13",37 "Programming Language :: Python :: Implementation :: CPython",38 "Programming Language :: Python :: Implementation :: PyPy",39 "Topic :: Internet :: WWW/HTTP",40 "Topic :: Software Development :: Libraries",41 "Topic :: Software Development :: Libraries :: Python Modules",42 "Topic :: Scientific/Engineering :: Artificial Intelligence",43 "Typing :: Typed",44]4546[project.urls]47Homepage = "https://github.com/xai-org/xai-sdk-python"48Documentation = "https://docs.x.ai"49Repository = "https://github.com/xai-org/xai-sdk-python"5051[project.optional-dependencies]52telemetry-http = ["opentelemetry-exporter-otlp-proto-http>=1.36.0,<2"]53telemetry-grpc = ["opentelemetry-exporter-otlp-proto-grpc>=1.36.0,<2"]545556[[tool.uv.index]]57name = "testpypi"58url = "https://test.pypi.org/simple/"59publish-url = "https://test.pypi.org/legacy/"60explicit = true6162[tool.hatch.version]63path = "src/xai_sdk/__about__.py"6465# hatch respects .gitignore and will ignore all files that the .gitignore file specifies by default66[tool.hatch.build.targets.sdist]67exclude = [".github", ".gitleaks.toml", ".pre-commit-config.yaml"]6869[tool.hatch.build.targets.wheel]70packages = ["src/xai_sdk"]7172[tool.hatch.metadata.hooks.fancy-pypi-readme]73content-type = "text/markdown"7475[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]76path = "README.md"7778[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]79pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'80replacement = '[\1](https://github.com/xai-org/xai-sdk-python/tree/main\g<2>)'8182[tool.ruff]83exclude = ["src/xai_sdk/proto"]84target-version = "py310"85line-length = 1208687[tool.ruff.lint]88select = [89 "A",90 "ARG",91 "B",92 "C",93 "D",94 "DTZ",95 "E",96 "EM",97 "F",98 "FBT",99 "I",100 "ICN",101 "ISC",102 "N",103 "PLC",104 "PLE",105 "PLR",106 "PLW",107 "Q",108 "RUF",109 "S",110 "T",111 "TID",112 "UP",113 "W",114 "YTT",115]116ignore = [117 "D100", # Allow missing docstring in top level module118 "D104", # Allow missing docstring in public package119 "D105", # Allow missing docstring in magic method120 "D203", # Allow docstring directly below class definition (as enforced by D211)121 "D213", # Allow multi-line-summary on first line of docstring (as enforced by D212)122 "D401", # Allow non imperative mood in docstring123 "D413", # Allow no new line at end of docstring.124 "EM101", # Allow `raise ValueError(msg)`125 "EM102", # Allow f strings in `raise` statements126 "FBT003", # Allow boolean positional values in function calls, like `dict.get(... True)`127 "TID252", # Allow relative imports128 "UP007", # Allow `from typing import Optional` instead of `X | None`129 "UP035", # Allow `from typing import Optional` instead of `X | None`130 "UP045", # Allow `from typing import Sequence` instead of `Sequence[X]`131 "PLR0913",132]133unfixable = ["F401"]134135[tool.ruff.lint.isort]136known-first-party = ["xai_sdk"]137138[tool.ruff.lint.flake8-tidy-imports]139ban-relative-imports = "all"140141[tool.ruff.lint.per-file-ignores]142"tests/**/*" = [143 "D",144 "DTZ005",145 "PLR0911",146 "PLR0912",147 "PLR0915",148 "PLR2004",149 "S101",150 "S105",151 "S106",152 "S107",153 "TID252",154]155"examples/**/*" = ["D", "S101", "T201"]156157[tool.coverage.run]158source_pkgs = ["src/xai_sdk", "tests"]159branch = true160parallel = true161omit = ["src/xai_sdk/__about__.py", "src/xai_sdk/proto"]162163[tool.coverage.paths]164xai = ["src/xai_sdk"]165tests = ["test"]166167[tool.coverage.report]168exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]169170[tool.pytest.ini_options]171testpaths = ["tests"]172asyncio_mode = "strict"173asyncio_default_fixture_loop_scope = "session"174asyncio_default_test_loop_scope = "session"175176[tool.pyright]177pythonversion = "3.10"178include = ["src/xai_sdk", "tests", "examples"]179exclude = ["src/xai_sdk/proto"]180venvPath = ".venv"181typeCheckingMode = "basic"182183[dependency-groups]184dev = [185 "absl-py>=2.2.2",186 "grpcio-tools>=1.71.0",187 "hatch>=1.14.1",188 "packaging>=25.0",189 "portpicker>=1.6.0",190 "pre-commit>=4.2.0",191 "pyright==1.1.400",192 "pytest>=7.4.4",193 "pytest-asyncio>=0.21.2",194 "pytest-cov>=6.1.1",195 "pytest-repeat>=0.9.4",196 "pytest-xdist>=3.6.1",197 "ruff>=0.11.7",198 "tqdm>=4.67.1",199]200