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
A tiny helper that prepares the Azure Cognitive Services Search namespace so downstream search client packages import correctly on both Python 2 and Python 3.
prepare_namespace() loads the search namespace package, returns True, and ensures imports under azure.cognitiveservices.search succeed without raising an ImportError. @testprepare_namespace() performs no namespace package import, returns False, and signals that no preparation was needed. @testprepare_namespace() more than once does not duplicate namespace paths or repeat side effects, while returning the same boolean result on subsequent calls. @testnamespace_available() reports whether imports under azure.cognitiveservices.search currently resolve, never bubbling up import errors. @test@generates
def prepare_namespace() -> bool:
"""Prepares the search namespace for the current interpreter version and returns whether a namespace package import was performed."""
def namespace_available() -> bool:
"""Returns True when imports under azure.cognitiveservices.search resolve after any necessary preparation."""Provides the version-conditional namespace package for Azure Cognitive Services Search, ensuring namespace path extension where needed.
Install with Tessl CLI
npx tessl i tessl/pypi-azure-cognitiveservices-search-nspkg