Microsoft Azure Cognitive Services Search Namespace Package for Python 2/3 compatibility
64
Quality
Pending
Does it follow best practices?
Impact
64%
1.25xAverage score across 6 eval scenarios
Create a small diagnostic utility that inspects the Azure Cognitive Services Search namespace and reports its readiness when only the namespace placeholder package is installed (no runtime search clients are present).
namespace_present: true and clients: []. @testazure.cognitiveservices.search.imagesearch) in the clients field. @testazure 0.x package is installed, the tool includes a human-readable warning advising users to uninstall it before using search SDKs. @testpython_version field to explain why the namespace may be empty on newer interpreters. @test@generates
from typing import Any, Dict, List, Optional
def detect_namespace() -> bool:
"""Return True if the search namespace can be imported without errors."""
def find_search_clients() -> List[str]:
"""Return sorted dotted module names discovered under the search namespace."""
def legacy_conflict_warning() -> str:
"""Return a warning message when a legacy azure 0.x package is installed, else an empty string."""
def build_report() -> Dict[str, Any]:
"""
Return a dictionary containing:
- namespace_present: bool
- clients: List[str]
- legacy_conflict: str
- python_version: str
"""
def main(argv: Optional[List[str]] = None) -> int:
"""Write the report as JSON to stdout, emit errors to stderr, and return an exit status."""Provides the search namespace placeholder needed for discovery and compatibility checks.
Install with Tessl CLI
npx tessl i tessl/pypi-azure-cognitiveservices-search-nspkg