or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

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

0

# Azure Cognitive Services Search Namespace Package

1

2

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.

3

4

## Package Information

5

6

- **Package Name**: azure-cognitiveservices-search-nspkg

7

- **Package Type**: pypi

8

- **Language**: Python

9

- **Version**: 3.0.1

10

- **License**: MIT License

11

- **Author**: Microsoft Corporation

12

- **Repository**: https://github.com/Azure/azure-sdk-for-python

13

- **Installation**: `pip install azure-cognitiveservices-search-nspkg` (typically installed automatically as dependency)

14

15

## Core Imports

16

17

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

18

19

```python

20

# This package has no public API to import

21

# It automatically configures the azure.cognitiveservices.search namespace

22

# when installed as a dependency of other Azure SDK packages

23

```

24

25

## Basic Usage

26

27

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

28

29

```python

30

# You don't use this package directly

31

# Instead, install actual Azure Cognitive Services Search packages like:

32

# pip install azure-cognitiveservices-search-websearch

33

# pip install azure-cognitiveservices-search-imagesearch

34

35

# Then import from the properly namespaced modules:

36

# from azure.cognitiveservices.search.websearch import WebSearchClient

37

```

38

39

## Architecture

40

41

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

42

43

- **Python 2.x**: Installs actual namespace directory structure with `__init__.py` files containing `pkgutil.extend_path()` calls

44

- **Python 3.x**: Installs empty package, relying on PEP 420 implicit namespace packages

45

- **Compatibility Check**: Includes validation to prevent conflicts with legacy azure v0.x packages

46

47

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

48

```

49

azure/

50

├── __init__.py # Extends azure namespace

51

└── cognitiveservices/

52

├── __init__.py # Extends cognitiveservices namespace

53

└── search/

54

└── __init__.py # Extends search namespace

55

```

56

57

## Capabilities

58

59

### Namespace Extension

60

61

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

62

63

```python { .api }

64

# No public functions, classes, or constants are exported

65

# The package only provides internal namespace structure

66

```

67

68

## Package Dependencies

69

70

```python { .api }

71

# Requires:

72

# - azure-cognitiveservices-nspkg >= 3.0.0

73

```

74

75

## Version Compatibility

76

77

- **Python 2.7**: Full namespace package functionality

78

- **Python 3.4, 3.5, 3.6, 3.7+**: Empty package (uses PEP 420 implicit namespaces)

79

- **azure v0.x**: Incompatible (package includes validation check)

80

81

## Error Handling

82

83

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

84

85

```python

86

# Exception raised if azure v0.x is installed:

87

Exception: 'This package is incompatible with azure==<version>. Uninstall it with "pip uninstall azure".'

88

```

89

90

## Summary

91

92

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.