SPB Git
4.3 KB · 48 lines json
1{2  "slug": "instructor",3  "name": "Instructor",4  "aliases": ["instructor (PyPI)", "python-instructor"],5  "vendor": { "name": "Jason Liu and contributors (567 Labs)", "slug": "567-labs", "website": "https://python.useinstructor.com" },6  "homepage_url": "https://python.useinstructor.com/",7  "docs_url": "https://python.useinstructor.com/",8  "repo_url": "https://github.com/567-labs/instructor",9  "license_url": "https://github.com/567-labs/instructor/blob/main/LICENSE",10  "product_type": "library",11  "product_status": "active",12  "summary": "Python library for extracting validated structured data from LLM responses using Pydantic models, with automatic retries, streaming partials and support for many providers",13  "description": "Instructor is an MIT-licensed Python library for getting structured, validated output from language models. You define the desired schema as a Pydantic model, patch or wrap a provider client, and request that type; Instructor converts the schema into the provider's tool-calling or JSON mode, validates the response and automatically retries with the validation errors when the model's output does not conform. Streaming of partial objects and of lists of objects, hooks for logging and both sync and async clients round out the core. It supports more than fifteen providers including OpenAI, Anthropic, Google Gemini, Mistral, Cohere, DeepSeek, Vertex AI and local models through Ollama or llama-cpp-python, and ports exist in TypeScript, Ruby, Go, Elixir and Rust.\n\nThe library is small and composable, which makes it a frequent choice for extraction pipelines (entities from filings, fields from invoices) where a full agent framework would be excessive. Its scope is deliberately narrow: it does not orchestrate multi-step agents, and provider JSON-mode quirks occasionally require schema adjustments.",14  "capabilities": ["Pydantic-typed outputs from LLM calls", "Automatic validation-driven retries", "Streaming partial objects and iterables", "Support for 15+ providers and local models", "Hooks for logging and error handling; sync and async clients", "Ports in TypeScript, Ruby, Go, Elixir and Rust"],15  "workflows": ["Extract typed records from unstructured documents", "Classify text into an enum with validation", "Stream a list of extracted items to a UI as they arrive"],16  "advantages": ["Minimal API built on Pydantic", "Provider-agnostic", "MIT license"],17  "limitations": ["Not an orchestration framework", "Depends on provider JSON or tool-calling behavior", "Python-first; ports lag the main library"],18  "prerequisites": ["Python 3.9+ with Pydantic", "Provider API key or local model"],19  "audiences": ["Developers building extraction pipelines", "Data teams structuring text at scale"],20  "alternatives": ["pydantic-ai", "langchain", "dspy", "openai-platform"],21  "categories": [{ "slug": "agent-frameworks", "primary": true }, { "slug": "data-quality", "label": "Validated extraction from text" }],22  "tags": ["python", "open-source", "llm", "structured-outputs", "pydantic"],23  "use_cases": ["parse-sec-filings", "build-agents"],24  "operating_systems": ["macos", "linux", "windows"],25  "execution_modes": ["local"],26  "interfaces": ["library"],27  "deployment_models": ["embedded"],28  "integrations": ["Pydantic", "OpenAI", "Anthropic", "Google Gemini", "Mistral", "Cohere", "Ollama", "LiteLLM"],29  "data_formats": ["JSON", "JSON Schema"],30  "languages": ["Python"],31  "source_model": "open-source",32  "license_spdx": "MIT",33  "pricing_model": ["open-source", "free"],34  "self_hostable": true,35  "sources": [36    { "url": "https://python.useinstructor.com/", "type": "official_site", "title": "Instructor documentation", "supports": ["name", "summary", "capabilities", "integrations", "license_spdx"], "checked_at": "2026-11-02" },37    { "url": "https://github.com/567-labs/instructor", "type": "repository", "supports": ["license_spdx", "languages"], "checked_at": "2026-11-02", "note": "github.com/instructor-ai/instructor redirects here" },38    { "url": "https://github.com/567-labs/instructor/blob/main/LICENSE", "type": "license_page", "supports": ["license_spdx", "source_model"], "checked_at": "2026-11-02" }39  ],40  "confidence": "high",41  "discovery_method": "editorial-research",42  "depth": "standard",43  "editorial_status": "reviewed",44  "visibility": "public",45  "featured": false,46  "author": "batch-A"47}48
Files · d0878ed8ec6f375df09d3e415bf35d941ff62d79
Menu

Theme