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.8.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

zipher_sdk-0.1.8-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zipher-sdk-0.1.8.tar.gz
  • Upload date:
  • Size: 7.8 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.8.tar.gz
Algorithm Hash digest
SHA256 e6b112d421c4cc0b61c209359954672d8e8aa5a4d582038f3d9d108adea1d99c
MD5 f66f83915bda712b4d3a9186d060d197
BLAKE2b-256 1a2f4127eb9dec90d5c8112bd08eb939876f0c3934af5d3d5ec382c3ebe66db8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zipher_sdk-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 8.8 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8fa357eff1505145a738259b7e9c2e3c7a5925a6006c532e5ad697dc54c2d8a5
MD5 b90db4ca262652b3b7f86e507caaad06
BLAKE2b-256 f1820c7c4bc1288b62ffd7a1c5bb259c0c65a1d818005309f396adaec74bcead

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