or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

tessl/pypi-google-cloud-visionai

Google Cloud Vision AI API client library for building and deploying Vertex AI Vision applications

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/google-cloud-visionai@0.1.x

To install, run

npx @tessl/cli install tessl/pypi-google-cloud-visionai@0.1.0

0

# Google Cloud Vision AI

1

2

Google Cloud Vision AI API client library for building and deploying Vertex AI Vision applications. This package provides comprehensive video analytics, streaming, and media management capabilities through six core service areas including application management, live video analysis, real-time streaming, asset warehousing, and infrastructure management.

3

4

## Package Information

5

6

- **Package Name**: google-cloud-visionai

7

- **Package Type**: pypi

8

- **Language**: Python

9

- **Installation**: `pip install google-cloud-visionai`

10

11

## Core Imports

12

13

Main convenience package (aliases v1 APIs):

14

15

```python

16

from google.cloud import visionai

17

```

18

19

Stable v1 API:

20

21

```python

22

from google.cloud import visionai_v1

23

```

24

25

Alpha/preview API:

26

27

```python

28

from google.cloud import visionai_v1alpha1

29

```

30

31

Service-specific imports:

32

33

```python

34

from google.cloud.visionai_v1 import (

35

AppPlatformClient,

36

LiveVideoAnalyticsClient,

37

StreamingServiceClient,

38

StreamsServiceClient,

39

WarehouseClient,

40

HealthCheckServiceClient

41

)

42

```

43

44

## Basic Usage

45

46

```python

47

from google.cloud import visionai_v1

48

49

# Create service clients with automatic authentication

50

app_client = visionai_v1.AppPlatformClient()

51

warehouse_client = visionai_v1.WarehouseClient()

52

streaming_client = visionai_v1.StreamingServiceClient()

53

54

# Basic application management

55

parent = "projects/my-project/locations/us-central1"

56

applications = app_client.list_applications(parent=parent)

57

58

# Basic asset management

59

corpus_parent = "projects/my-project/locations/us-central1"

60

corpora = warehouse_client.list_corpora(parent=corpus_parent)

61

62

# Using path helpers for resource names

63

application_path = app_client.application_path("my-project", "us-central1", "my-app")

64

corpus_path = warehouse_client.corpus_path("my-project", "us-central1", "my-corpus")

65

```

66

67

Async client usage:

68

69

```python

70

import asyncio

71

from google.cloud import visionai_v1

72

73

async def main():

74

async with visionai_v1.AppPlatformAsyncClient() as client:

75

applications = await client.list_applications(parent=parent)

76

77

asyncio.run(main())

78

```

79

80

## Architecture

81

82

Google Cloud Vision AI is organized around six core service areas that work together to provide comprehensive video analytics capabilities:

83

84

### Service Architecture

85

86

- **AppPlatform**: Application lifecycle management and deployment

87

- **LiveVideoAnalytics**: Real-time video analysis with operators and processes

88

- **StreamingService**: Bidirectional packet streaming with lease management

89

- **StreamsService**: Infrastructure for clusters, streams, and event management

90

- **Warehouse**: Asset storage, indexing, search, and analysis

91

- **HealthCheckService**: Service monitoring and health verification

92

93

### Client Architecture

94

95

Each service provides both synchronous and asynchronous clients with identical APIs:

96

- **Sync clients**: `ServiceClient` (e.g., `AppPlatformClient`)

97

- **Async clients**: `ServiceAsyncClient` (e.g., `AppPlatformAsyncClient`)

98

99

### Resource Hierarchy

100

101

```

102

Project → Location → Service Resources

103

├── Applications (AppPlatform)

104

├── Analyses/Operators/Processes (LiveVideoAnalytics)

105

├── Clusters → Streams → Events/Series (StreamsService)

106

└── Corpora → Assets → Annotations (Warehouse)

107

```

108

109

### Authentication

110

111

All clients use Google Cloud authentication automatically via:

112

- Application Default Credentials (ADC)

113

- Service account key files

114

- Workload Identity (GKE/Cloud Run)

115

- User credentials via gcloud CLI

116

117

## Capabilities

118

119

### Application Platform Management

120

121

Complete lifecycle management for Vision AI applications including deployment, scaling, and stream input configuration.

122

123

```python { .api }

124

class AppPlatformClient:

125

def list_applications(self, parent: str) -> Iterable[Application]: ...

126

def create_application(self, parent: str, application: Application) -> Operation: ...

127

def deploy_application(self, name: str) -> Operation: ...

128

def add_application_stream_input(self, name: str, application_stream_inputs: List[ApplicationStreamInput]) -> Operation: ...

129

```

130

131

[Application Platform](./app-platform.md)

132

133

### Live Video Analytics

134

135

Real-time video analysis capabilities with custom operators, analysis definitions, and batch processing workflows.

136

137

```python { .api }

138

class LiveVideoAnalyticsClient:

139

def list_analyses(self, parent: str) -> Iterable[Analysis]: ...

140

def create_analysis(self, parent: str, analysis: Analysis) -> Operation: ...

141

def list_operators(self, parent: str) -> Iterable[Operator]: ...

142

def batch_run_process(self, parent: str, requests: List[CreateProcessRequest]) -> Operation: ...

143

```

144

145

[Live Video Analytics](./live-video-analytics.md)

146

147

### Real-Time Streaming Services

148

149

Bidirectional streaming capabilities for video packets, events, and lease-based resource management.

150

151

```python { .api }

152

class StreamingServiceClient:

153

def send_packets(self, requests: Iterator[SendPacketsRequest]) -> Iterator[SendPacketsResponse]: ...

154

def receive_packets(self, requests: Iterator[ReceivePacketsRequest]) -> Iterator[ReceivePacketsResponse]: ...

155

def acquire_lease(self, session: str, owner: str, term: Duration) -> Lease: ...

156

```

157

158

[Real-Time Streaming](./streaming.md)

159

160

### Stream Infrastructure Management

161

162

Infrastructure management for clusters, streams, events, and time series data organization.

163

164

```python { .api }

165

class StreamsServiceClient:

166

def create_cluster(self, parent: str, cluster: Cluster) -> Operation: ...

167

def create_stream(self, parent: str, stream: Stream) -> Operation: ...

168

def create_event(self, parent: str, event: Event) -> Operation: ...

169

def materialize_channel(self, parent: str, channel_id: str, channel: Channel) -> Operation: ...

170

```

171

172

[Stream Infrastructure](./streams-management.md)

173

174

### Media Asset Warehouse

175

176

Comprehensive media asset management with AI-powered analysis, indexing, search, and collection organization.

177

178

```python { .api }

179

class WarehouseClient:

180

def create_asset(self, parent: str, asset: Asset) -> Asset: ...

181

def analyze_asset(self, name: str) -> Operation: ...

182

def search_assets(self, corpus: str, criteria: List[Criteria]) -> Iterator[SearchResultItem]: ...

183

def index_asset(self, name: str, index: str) -> Operation: ...

184

```

185

186

[Media Asset Warehouse](./warehouse.md)

187

188

### Infrastructure Health Monitoring

189

190

Service monitoring and health verification capabilities for Vision AI clusters and infrastructure components.

191

192

```python { .api }

193

class HealthCheckServiceClient:

194

def health_check(self, cluster: str) -> HealthCheckResponse: ...

195

```

196

197

[Health Check Service](./health-check.md)

198

199

## Common Types and Patterns

200

201

Core type definitions, enums, and data structures shared across all services.

202

203

[Common Types](./types.md)

204

205

## Version Support

206

207

- **v1 (Stable)**: All six services with full functionality

208

- **v1alpha1 (Preview)**: Five services with limited LiveVideoAnalytics (analyses only)

209

210

Use the stable v1 API for production applications and v1alpha1 for accessing preview features.