[project] authors = [{ name = "Jason Liu", email = "jason@jxnl.co" }, { name = "Ivan Leo", email = "ivan@jxnl.co" }, ] license = { text = "MIT" } requires-python = "<4.0,>=3.9" dependencies = [ "openai<2.0.0,>=1.70.0", "pydantic<3.0.0,>=2.8.0", "docstring-parser<1.0,>=0.16", "typer<1.0.0,>=0.9.0", "rich<15.0.0,>=13.7.0", "aiohttp<4.0.0,>=3.9.1", "tenacity<10.0.0,>=8.2.3", "pydantic-core<3.0.0,>=2.18.0", "jiter>=0.6.1,<0.11", "jinja2<4.0.0,>=3.1.4", "requests<3.0.0,>=2.32.3", "diskcache>=5.6.3", ] name = "instructor" version = "1.10.0" description = "structured outputs for llm" readme = "README.md" [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.uv] package = true [project.urls] repository = "https://github.com/instructor-ai/instructor" [tool.pyright] include = ["instructor"] exclude = [ "**/node_modules", "**/__pycache__", "src/experimental", "src/typestubs", "**/tests/**", ] reportMissingImports = "warning" reportMissingTypeStubs = false pythonVersion = "3.9" pythonPlatform = "Linux" [project.optional-dependencies] dev = [ "pytest<9.0.0,>=8.3.3", "pytest-asyncio<1.0.0,>=0.24.0", "coverage<8.0.0,>=7.3.2", "pyright<2.0.0", "jsonref<2.0.0,>=1.1.0", "pytest-examples>=0.0.15", "python-dotenv>=1.0.1", "pytest-xdist>=3.8.0", "pre-commit>=4.2.0", ] docs = [ "mkdocs<2.0.0,>=1.6.1", "mkdocs-material[imaging]<10.0.0,>=9.5.9", "mkdocstrings>=0.27.1,<0.30.0", "mkdocstrings-python<2.0.0,>=1.12.2", "pytest-examples>=0.0.15", "mkdocs-jupyter<0.26.0,>=0.24.6", "mkdocs-rss-plugin<2.0.0,>=1.12.0", "mkdocs-minify-plugin<1.0.0,>=0.8.0", "mkdocs-redirects<2.0.0,>=1.2.1", "mkdocs-material-extensions>=1.3.1", "mkdocs-material>=9.6.14", ] test-docs = [ "fastapi<0.116.0,>=0.109.2", "redis>=5.0.1,<7.0.0", "diskcache<6.0.0,>=5.6.3", "pandas<3.0.0,>=2.2.0", "tabulate<1.0.0,>=0.9.0", "pydantic-extra-types<3.0.0,>=2.6.0", "litellm<2.0.0,>=1.35.31", "mistralai<2.0.0,>=1.5.1", ] anthropic = ["anthropic==0.53.0", "xmltodict<0.15,>=0.13"] groq = ["groq>=0.4.2,<0.27.0"] cohere = ["cohere<6.0.0,>=5.1.8"] vertexai = ["google-cloud-aiplatform<2.0.0,>=1.53.0", "jsonref<2.0.0,>=1.1.0"] cerebras_cloud_sdk = ["cerebras-cloud-sdk<2.0.0,>=1.5.0"] fireworks-ai = ["fireworks-ai<1.0.0,>=0.15.4"] writer = ["writer-sdk<3.0.0,>=2.2.0"] bedrock = ["boto3<2.0.0,>=1.34.0"] mistral = ["mistralai<2.0.0,>=1.5.1"] perplexity = ["openai<2.0.0,>=1.52.0"] google-genai = ["google-genai>=1.5.0","jsonref<2.0.0,>=1.1.0"] litellm = ["litellm<2.0.0,>=1.35.31"] xai = ["xai-sdk>=0.2.0 ; python_version >= '3.10'", "python-dotenv>=1.0.0"] phonenumbers = ["phonenumbers>=8.13.33,<10.0.0"] graphviz = ["graphviz<1.0.0,>=0.20.3"] sqlmodel = ["sqlmodel<1.0.0,>=0.0.22"] trafilatura = ["trafilatura<3.0.0,>=1.12.2"] pydub = ["pydub<1.0.0,>=0.25.1"] datasets = ["datasets<4.0.0,>=3.0.1"] [project.scripts] instructor = "instructor.cli.cli:app" [dependency-groups] dev = [ "pytest<9.0.0,>=8.3.3", "pytest-asyncio<1.0.0,>=0.24.0", "coverage<8.0.0,>=7.3.2", "pyright<2.0.0", "jsonref<2.0.0,>=1.1.0", "pytest-examples>=0.0.15", "python-dotenv>=1.0.1", "pytest-xdist>=3.8.0", "pre-commit>=4.2.0", ] docs = [ "mkdocs<2.0.0,>=1.4.3", "mkdocs-material[imaging]<10.0.0,>=9.5.9", "mkdocstrings>=0.26.1,<0.30.0", "mkdocstrings-python<2.0.0,>=1.11.1", "pytest-examples>=0.0.15", "mkdocs-jupyter<0.26.0,>=0.24.6", "mkdocs-rss-plugin<2.0.0,>=1.12.0", "mkdocs-minify-plugin<1.0.0,>=0.8.0", "mkdocs-redirects<2.0.0,>=1.2.1", "mkdocs-material-extensions>=1.3.1", "material>=0.1", "cairosvg>=2.7.1", "pillow>=10.4.0", ] anthropic = ["anthropic==0.53.0", "xmltodict<0.15,>=0.13"] test-docs = [ "fastapi<0.116.0,>=0.109.2", "redis>=5.0.1,<7.0.0", "diskcache<6.0.0,>=5.6.3", "pandas<3.0.0,>=2.2.0", "tabulate<1.0.0,>=0.9.0", "pydantic-extra-types<3.0.0,>=2.6.0", "litellm<2.0.0,>=1.35.31", "anthropic==0.53.0", "xmltodict<0.15,>=0.13", "groq>=0.4.2,<0.27.0", "phonenumbers>=8.13.33,<10.0.0", "cohere<6.0.0,>=5.1.8", "mistralai<2.0.0,>=1.5.1", "cerebras-cloud-sdk<2.0.0,>=1.5.0", "fireworks-ai<1.0.0,>=0.15.4", "graphviz<1.0.0,>=0.20.3", "sqlmodel<1.0.0,>=0.0.22", "trafilatura<3.0.0,>=1.12.2", "pydub<1.0.0,>=0.25.1", "datasets<4.0.0,>=3.0.1", "writer-sdk<3.0.0,>=2.2.0", ] litellm = ["litellm<2.0.0,>=1.35.31"] vertexai = ["google-cloud-aiplatform<2.0.0,>=1.53.0", "jsonref<2.0.0,>=1.1.0"] bedrock = ["boto3<2.0.0,>=1.34.0"] mistral = ["mistralai<2.0.0,>=1.5.1"] perplexity = ["openai<2.0.0,>=1.52.0"] groq = ["groq>=0.4.2,<0.27.0"] cohere = ["cohere<6.0.0,>=5.1.8"] cerebras_cloud_sdk = ["cerebras-cloud-sdk<2.0.0,>=1.5.0"] fireworks-ai = ["fireworks-ai<1.0.0,>=0.15.4"] writer = ["writer-sdk<3.0.0,>=2.2.0"] google-genai = ["google-genai>=1.5.0","jsonref<2.0.0,>=1.1.0"] examples = [ "cohere>=5.13.4", "datasets>=3.2.0", "pyright==1.1.401", "ruff==0.11.13", "trafilatura>=2.0.0", ]