or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

index.md
tile.json

tessl/pypi-azure-cognitiveservices-search-nspkg

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

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/azure-cognitiveservices-search-nspkg@3.0.x

To install, run

npx @tessl/cli install tessl/pypi-azure-cognitiveservices-search-nspkg@3.0.0

index.mddocs/

Azure Cognitive Services Search Namespace Package

Microsoft Azure Cognitive Services Search Namespace Package is an internal infrastructure component that provides namespace organization for Azure Cognitive Services Search SDKs in Python. This package enables proper namespace partitioning for azure.cognitiveservices.search modules and handles Python 2/3 compatibility.

Package Information

  • Package Name: azure-cognitiveservices-search-nspkg
  • Package Type: pypi
  • Language: Python
  • Version: 3.0.1
  • License: MIT License
  • Author: Microsoft Corporation
  • Repository: https://github.com/Azure/azure-sdk-for-python
  • Installation: pip install azure-cognitiveservices-search-nspkg (typically installed automatically as dependency)

Core Imports

This package provides no direct imports. It serves only as namespace infrastructure:

# This package has no public API to import
# It automatically configures the azure.cognitiveservices.search namespace
# when installed as a dependency of other Azure SDK packages

Basic Usage

This package is not intended for direct use. It is automatically installed as a dependency when you install Azure Cognitive Services Search SDK packages.

# You don't use this package directly
# Instead, install actual Azure Cognitive Services Search packages like:
# pip install azure-cognitiveservices-search-websearch
# pip install azure-cognitiveservices-search-imagesearch

# Then import from the properly namespaced modules:
# from azure.cognitiveservices.search.websearch import WebSearchClient

Architecture

This package implements a pkgutil-style namespace package with Python 2/3 compatibility:

  • Python 2.x: Installs actual namespace directory structure with __init__.py files containing pkgutil.extend_path() calls
  • Python 3.x: Installs empty package, relying on PEP 420 implicit namespace packages
  • Compatibility Check: Includes validation to prevent conflicts with legacy azure v0.x packages

The namespace hierarchy created (Python 2.x only):

azure/
├── __init__.py              # Extends azure namespace
└── cognitiveservices/
    ├── __init__.py          # Extends cognitiveservices namespace  
    └── search/
        └── __init__.py      # Extends search namespace

Capabilities

Namespace Extension

IMPORTANT: This package provides zero public API. All functionality is automatic namespace configuration.

# No public functions, classes, or constants are exported
# The package only provides internal namespace structure

Package Dependencies

# Requires:
# - azure-cognitiveservices-nspkg >= 3.0.0

Version Compatibility

  • Python 2.7: Full namespace package functionality
  • Python 3.4, 3.5, 3.6, 3.7+: Empty package (uses PEP 420 implicit namespaces)
  • azure v0.x: Incompatible (package includes validation check)

Error Handling

The package includes compatibility validation that raises an exception if incompatible azure v0.x versions are detected:

# Exception raised if azure v0.x is installed:
Exception: 'This package is incompatible with azure==<version>. Uninstall it with "pip uninstall azure".'

Summary

This package contains no user-facing functionality. It serves purely as namespace infrastructure to allow other azure-cognitiveservices-search-* packages to install into the proper azure.cognitiveservices.search namespace hierarchy. End users should never install or import from this package directly.