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
Release history Release notifications | RSS feed
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.6.tar.gz
(7.7 kB
view details)
Built Distribution
File details
Details for the file zipher-sdk-0.1.6.tar.gz
.
File metadata
- Download URL: zipher-sdk-0.1.6.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24942e74fd9c8005c2cad244542e89061bbb0aa5e023ac3d37f3a838361f2a9c |
|
MD5 | 76fcfc7a52ddb2f94e241f764e5fac55 |
|
BLAKE2b-256 | 1a4340a1b32be881280d1bf9ab4c04036d565a2284ecfb81dd2b8013013ae595 |
File details
Details for the file zipher_sdk-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: zipher_sdk-0.1.6-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bb1f6c8947125d86b196a97c8dc9ccd9c287997df0bb603ffeecff1f9af6b7f |
|
MD5 | 5c55d92efce1ac9da1c6877e7c548d42 |
|
BLAKE2b-256 | 2f61d1b9477c3b62f40ac8e9096765c943561506f3cb110699466e33dc6498d5 |