Skip to main content

Python SDK for programmatic access to the Zipher API

Project description

Zipher SDK

The Zipher SDK is a Python library for interacting with Zipher's APIs.

Installation

You can install the Zipher SDK using pip:

pip install zipher-sdk

Usage

Here are some basic examples of how you can use the Zipher SDK to optimize your databricks clusters using Zipher's ML-powered optimization engine:

Update Existing Configuration

You can update an existing configuration by initializing a zipher Client and sending a JSON payload to the update_existing_conf function. Here's how you can do it:

from zipher import Client

client = Client(customer_id="my_customer_id")  # assuming the zipher API key is stored in ZIPHER_API_KEY environment variable

# Your existing cluster config:
config_payload = {
    "new_cluster": {
        "autoscale": {
            "min_workers": 1,
            "max_workers": 30
        },
        "cluster_name": "my-cluster",
        "spark_version": "10.4.x-scala2.12",
        "spark_conf": {
            "spark.driver.maxResultSize": "4g"
        },
        "aws_attributes": {
            "first_on_demand": 0,
            "availability": "SPOT",
            "zone_id": "auto",
            "spot_bid_price_percent": 100,
            "ebs_volume_count": 0
        },
        "node_type_id": "rd-fleet.2xlarge",
        "driver_node_type_id": "rd-fleet.xlarge",
        "spark_env_vars": {},
        "enable_elastic_disk": "false"
    }
}

# Update configuration
optimized_cluster = client.update_existing_conf(job_id="my-job-id", existing_conf=config_payload)

# Continue with sending the optimized configuration to Databricks via the Databricks python SDK, Airflow operator, etc.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zipher-sdk-0.1.7.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

zipher_sdk-0.1.7-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file zipher-sdk-0.1.7.tar.gz.

File metadata

  • Download URL: zipher-sdk-0.1.7.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.1

File hashes

Hashes for zipher-sdk-0.1.7.tar.gz
Algorithm Hash digest
SHA256 6acc757d8d3d696a2682bed7d01d0d4186855e8bdcead828a55b8653f4ebb307
MD5 9e0cb0cbe05ff6c5fd3705d24262d492
BLAKE2b-256 73785bd0d9796ea8664b8619abbb2c7ca4738e5ec20be36563f4720372793f39

See more details on using hashes here.

File details

Details for the file zipher_sdk-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: zipher_sdk-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.1

File hashes

Hashes for zipher_sdk-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9e3b1f9aab45ed74ac4a6e54189b7445c53cbdfe1c6c802d92265332aa9ce4dd
MD5 46db311dc10b8ec39a283152f28e4f83
BLAKE2b-256 1eab87980241ce95d3eda78add3ff9f5d83f8fab52b3a1a6117a4b81525b5e89

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page