CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-vdk-plugin-control-cli

Versatile Data Kit SDK plugin exposing CLI commands for managing the lifecycle of a Data Jobs.

Pending
Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

vdk-plugin-control-cli

A VDK (Versatile Data Kit) plugin that extends vdk-core with CLI commands for data job lifecycle management and provides integration with Control Service APIs for properties and secrets management. This plugin acts as a bridge between local vdk-core functionality and remote Control Service capabilities, enabling cloud-based data job deployment, management, and execution.

Package Information

  • Package Name: vdk-plugin-control-cli
  • Package Type: pypi
  • Language: Python
  • Installation: pip install vdk-plugin-control-cli

Core Imports

This plugin automatically registers with vdk-core through entry points. No direct imports are typically needed as functionality is exposed through vdk CLI commands and hooks.

For programmatic access to plugin components:

from vdk.plugin.control_cli_plugin.control_service_configuration import ControlServiceConfiguration
from vdk.plugin.control_cli_plugin.control_service_properties_client import ControlServicePropertiesServiceClient
from vdk.plugin.control_cli_plugin.control_service_secrets_client import ControlServiceSecretsServiceClient

Basic Usage

After installation, the plugin extends the vdk CLI with additional commands:

# Install the plugin
pip install vdk-plugin-control-cli

# Authentication against Control Service
vdk login

# Create a new data job in cloud and locally
vdk create my-job --cloud

# Deploy a data job
vdk deploy my-job

# List data jobs
vdk list

# Manage properties
vdk properties --set 'api-uri' 'http://api.example.com'

# Logout
vdk logout

Architecture

The plugin operates through three main entry points registered with vdk-core:

  1. vdk-plugin-control-cli: Main plugin that adds CLI commands and configuration
  2. vdk-control-service-properties: Properties backend using Control Service API
  3. vdk-execution-skip: Execution skip functionality to prevent concurrent job runs

The plugin integrates with vdk-core's hook system to extend functionality without modifying core behavior.

Types

from typing import Dict
import click
from vdk.api.plugin.plugin_input import IPropertiesServiceClient, ISecretsServiceClient
from vdk.internal.builtin_plugins.run.job_context import JobContext
from vdk.internal.core.config import Configuration, ConfigurationBuilder
from vdk.internal.core.context import CoreContext

Capabilities

CLI Command Integration

Extends vdk CLI with comprehensive data job lifecycle management commands from vdk-control-cli package.

@hookimpl(tryfirst=True)
def vdk_command_line(root_command: click.Group):
    """Hook implementation that adds CLI commands to vdk."""

CLI Commands

Configuration Management

Comprehensive configuration system for Control Service integration including authentication, HTTP settings, and service endpoints.

class ControlServiceConfiguration:
    def __init__(self, config: Configuration) -> None: ...
    def api_token(self): ...
    def control_service_rest_api_url(self): ...
    def control_http_verify_ssl(self): ...

Configuration

Properties Backend

Control Service-based properties storage and retrieval for data jobs, accessible through CLI and JobInput API.

class ControlServicePropertiesServiceClient(IPropertiesServiceClient):
    def __init__(self, rest_api_url: str): ...
    def read_properties(self, job_name: str, team_name: str): ...
    def write_properties(self, job_name: str, team_name: str, properties: Dict) -> Dict: ...

Properties Backend

Secrets Backend

Control Service-based secrets storage and retrieval for data jobs, with secure handling and API integration.

class ControlServiceSecretsServiceClient(ISecretsServiceClient):
    def __init__(self, rest_api_url: str): ...
    def read_secrets(self, job_name: str, team_name: str): ...
    def write_secrets(self, job_name: str, team_name: str, secrets: Dict) -> Dict: ...

Secrets Backend

Execution Control

Prevents concurrent execution of the same data job to maintain data consistency and prevent resource conflicts.

class ConcurrentExecutionChecker:
    def __init__(self, rest_api_url: str) -> None: ...
    def is_job_execution_running(self, job_name, job_team, job_execution_attempt_id) -> bool: ...

Execution Control

Error Handling

Specialized error handling decorator for Control Service API calls with user-friendly error messages and proper error categorization.

class ConstrolServiceApiErrorDecorator:
    def __init__(self, what="Control Service Error", consequences="Operation cannot complete."): ...
    def __call__(self, fn): ...

Error Handling

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/vdk-plugin-control-cli@0.1.x
Publish Source
CLI
Badge
tessl/pypi-vdk-plugin-control-cli badge