CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-azure-cognitiveservices-search-nspkg

Microsoft Azure Cognitive Services Search Namespace Package for Python 2/3 compatibility

64

1.25x

Quality

Pending

Does it follow best practices?

Impact

64%

1.25x

Average score across 6 eval scenarios

Overview
Eval results
Files

task.mdevals/scenario-6/

Legacy Azure Guard Installer

A lightweight installer script that uses the namespace package dependency to block legacy azure==0.x environments before preparing the Cognitive Services Search namespace.

Capabilities

Block legacy azure 0.x

  • With azure==0.10.0 already installed, running the installer aborts early using the dependency's built-in guard, returns a failing status, and emits a message that instructs the user to uninstall the legacy azure package before continuing. @test

Install when safe

  • When no azure package is present, the installer completes successfully, ensures the search namespace dependency is installed, and reports readiness in its output. @test

Idempotent on prepared envs

  • When the namespace dependency is already installed and there is no legacy azure package, rerunning the installer exits successfully without duplicate installs or errors. @test

Implementation

@generates

API

from typing import Optional

def install_search_namespace(force_reinstall: bool = False) -> str:
    """
    Runs the installation flow for the search namespace dependency.
    - Aborts with an instructive message if azure==0.* is installed.
    - Installs azure-cognitiveservices-search-nspkg when safe, optionally reinstalling if force_reinstall is True.
    - Returns a human-readable status string describing the action taken.
    - Raises an exception when blocking on the legacy package.
    """

Dependencies { .dependencies }

azure-cognitiveservices-search-nspkg { .dependency }

Provides the namespacing package and its built-in guard against legacy azure 0.x installations.

Install with Tessl CLI

npx tessl i tessl/pypi-azure-cognitiveservices-search-nspkg

tile.json