azure-search-documents-py
Azure AI Search for Python: vector and hybrid search, semantic ranking, indexing and skillsets.
- Kind
- Skill
- Works with
- Claude Code
- Languages
- Python
- Source
- microsoft/skills @ 2130750147de
- Path
- .github/plugins/azure-sdk-python/skills/azure-search-documents-py/SKILL.md
- License
- MIT
- Jobs
- Implementation
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# Azure AI Search SDK for Python Full-text, vector, and hybrid search with AI enrichment capabilities. ## Installation ```bash pip install azure-search-documents ``` ## Environment Variables ```bash AZURE_SEARCH_ENDPOINT=https://<service-name>.search.windows.net # Required for all auth methods AZURE_SEARCH_INDEX_NAME=<your-index-name> # Required for all auth methods AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production AZURE_SEARCH_API_KEY=<your-api-key> # Only required for the legacy API-key auth path below ``` ## Authentication & Lifecycle > **🔑 Two rules apply to every code sample below:** > > 1. **Prefer `DefaultAzureCredential`.** It works locally (Azure CLI / VS Code / Developer CLI) and in Azure (managed identity, workload identity) with no code change. Avoid connection strings, account/API keys — they bypass Entra audit and rotation. > - Local dev: `DefaultAzureCredential` works as-is. > - Production: set `AZURE_TOKEN_CREDENTIALS=prod` (or `AZURE_TOKEN_CREDENTIALS=<specific_credential>`) to constrain the credential chain to production-safe credentials. …