or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

app-platform.mdhealth-check.mdindex.mdlive-video-analytics.mdstreaming.mdstreams-management.mdtypes.mdwarehouse.md
tile.json

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

index.mddocs/

Google Cloud Vision AI

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.

Package Information

  • Package Name: google-cloud-visionai
  • Package Type: pypi
  • Language: Python
  • Installation: pip install google-cloud-visionai

Core Imports

Main convenience package (aliases v1 APIs):

from google.cloud import visionai

Stable v1 API:

from google.cloud import visionai_v1

Alpha/preview API:

from google.cloud import visionai_v1alpha1

Service-specific imports:

from google.cloud.visionai_v1 import (
    AppPlatformClient,
    LiveVideoAnalyticsClient,
    StreamingServiceClient,
    StreamsServiceClient,
    WarehouseClient,
    HealthCheckServiceClient
)

Basic Usage

from google.cloud import visionai_v1

# Create service clients with automatic authentication
app_client = visionai_v1.AppPlatformClient()
warehouse_client = visionai_v1.WarehouseClient()
streaming_client = visionai_v1.StreamingServiceClient()

# Basic application management
parent = "projects/my-project/locations/us-central1"
applications = app_client.list_applications(parent=parent)

# Basic asset management
corpus_parent = "projects/my-project/locations/us-central1"
corpora = warehouse_client.list_corpora(parent=corpus_parent)

# Using path helpers for resource names
application_path = app_client.application_path("my-project", "us-central1", "my-app")
corpus_path = warehouse_client.corpus_path("my-project", "us-central1", "my-corpus")

Async client usage:

import asyncio
from google.cloud import visionai_v1

async def main():
    async with visionai_v1.AppPlatformAsyncClient() as client:
        applications = await client.list_applications(parent=parent)
    
asyncio.run(main())

Architecture

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

Service Architecture

  • AppPlatform: Application lifecycle management and deployment
  • LiveVideoAnalytics: Real-time video analysis with operators and processes
  • StreamingService: Bidirectional packet streaming with lease management
  • StreamsService: Infrastructure for clusters, streams, and event management
  • Warehouse: Asset storage, indexing, search, and analysis
  • HealthCheckService: Service monitoring and health verification

Client Architecture

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

  • Sync clients: ServiceClient (e.g., AppPlatformClient)
  • Async clients: ServiceAsyncClient (e.g., AppPlatformAsyncClient)

Resource Hierarchy

Project → Location → Service Resources
├── Applications (AppPlatform)
├── Analyses/Operators/Processes (LiveVideoAnalytics)  
├── Clusters → Streams → Events/Series (StreamsService)
└── Corpora → Assets → Annotations (Warehouse)

Authentication

All clients use Google Cloud authentication automatically via:

  • Application Default Credentials (ADC)
  • Service account key files
  • Workload Identity (GKE/Cloud Run)
  • User credentials via gcloud CLI

Capabilities

Application Platform Management

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

class AppPlatformClient:
    def list_applications(self, parent: str) -> Iterable[Application]: ...
    def create_application(self, parent: str, application: Application) -> Operation: ...
    def deploy_application(self, name: str) -> Operation: ...
    def add_application_stream_input(self, name: str, application_stream_inputs: List[ApplicationStreamInput]) -> Operation: ...

Application Platform

Live Video Analytics

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

class LiveVideoAnalyticsClient:
    def list_analyses(self, parent: str) -> Iterable[Analysis]: ...
    def create_analysis(self, parent: str, analysis: Analysis) -> Operation: ...
    def list_operators(self, parent: str) -> Iterable[Operator]: ...
    def batch_run_process(self, parent: str, requests: List[CreateProcessRequest]) -> Operation: ...

Live Video Analytics

Real-Time Streaming Services

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

class StreamingServiceClient:
    def send_packets(self, requests: Iterator[SendPacketsRequest]) -> Iterator[SendPacketsResponse]: ...
    def receive_packets(self, requests: Iterator[ReceivePacketsRequest]) -> Iterator[ReceivePacketsResponse]: ...
    def acquire_lease(self, session: str, owner: str, term: Duration) -> Lease: ...

Real-Time Streaming

Stream Infrastructure Management

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

class StreamsServiceClient:
    def create_cluster(self, parent: str, cluster: Cluster) -> Operation: ...
    def create_stream(self, parent: str, stream: Stream) -> Operation: ...
    def create_event(self, parent: str, event: Event) -> Operation: ...
    def materialize_channel(self, parent: str, channel_id: str, channel: Channel) -> Operation: ...

Stream Infrastructure

Media Asset Warehouse

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

class WarehouseClient:
    def create_asset(self, parent: str, asset: Asset) -> Asset: ...
    def analyze_asset(self, name: str) -> Operation: ...
    def search_assets(self, corpus: str, criteria: List[Criteria]) -> Iterator[SearchResultItem]: ...
    def index_asset(self, name: str, index: str) -> Operation: ...

Media Asset Warehouse

Infrastructure Health Monitoring

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

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

Health Check Service

Common Types and Patterns

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

Common Types

Version Support

  • v1 (Stable): All six services with full functionality
  • v1alpha1 (Preview): Five services with limited LiveVideoAnalytics (analyses only)

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