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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: zipher-sdk-0.2.0.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.2.0.tar.gz
Algorithm Hash digest
SHA256 629fa54a12d6b9ca854896b11b131f5738d13bf1c0f402b520b54bac9cbb7583
MD5 9cb255ae7e1b5cbcab943d9ce6be30fe
BLAKE2b-256 e017a23b17346b8c7a8f9f9fbcc8a7284c7a790527f307a74aa043caba09b463

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zipher_sdk-0.2.0-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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40b670cb951bce5587c547388cd3be7c4af22b448ec25636c5b8400483e56b99
MD5 a2896504cae28e9b9d0335c025404958
BLAKE2b-256 d137a1afcb7fe326265e6117100630cd57f2009bf826379f47b73e1ba2735d98

See more details on using hashes here.

Supported by

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