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

Uploaded Source

Built Distribution

zipher_sdk-0.1.5-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zipher-sdk-0.1.5.tar.gz
  • Upload date:
  • Size: 7.4 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.5.tar.gz
Algorithm Hash digest
SHA256 fe8239059678375546f7f132b8d710f8a0e30ed812efda7088a85090fb5ce0c1
MD5 b31b331a7c6ba313df334a58663cc836
BLAKE2b-256 a3933cd4b46787279c8eb13789f56dc7fb67022ddd6e417fe702ea78b9f2aca1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zipher_sdk-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 8.5 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b414c56f9f403583dc00579990a62b57238196441e85005fc735520a2b7006ff
MD5 feb195c75af92b4a3ce1b03629ce778a
BLAKE2b-256 fe0903bf8c787b94c75835ce647fe6839149142405e5bff2017726ef83c29ff0

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