Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gsy0911/azutils
Utilities for Azure
https://github.com/gsy0911/azutils
Last synced: about 1 month ago
JSON representation
Utilities for Azure
- Host: GitHub
- URL: https://github.com/gsy0911/azutils
- Owner: gsy0911
- Created: 2020-11-06T07:47:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-28T08:33:17.000Z (about 4 years ago)
- Last Synced: 2024-11-13T10:16:14.714Z (3 months ago)
- Language: Python
- Size: 146 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# azutils
[![PythonVersion](https://img.shields.io/badge/python-3.6|3.7|3.8-blue.svg)](https://www.python.org/downloads/release/python-377/)
[![PiPY](https://img.shields.io/pypi/v/azutils.svg)](https://pypi.org/project/azutils/)`azutils` is to provide convenient Python functions for Azure Services.
* Databricks,
* Azure Batch ?## install
```bash
$ pip install azutils
```## usage
* for `Databricks`
```python
from azutils.databricks import DatabricksClient
token = "..."dc = DatabricksClient(token=token)
# list cluster
cluster_list = dc.clusters_list()for cluster in cluster_list:
print(cluster)# * cluster_name: some-cluster
# * cluster_id: XXXX-XXXXXX-xxxxxxx
# * spark_version: 7.1.x-scala2.12
# * driver_node_type: Standard_DS12_v2
# * node_type: Standard_DS3_v2
# * cost: 96.208 + 79.408 * NUM [YEN/HOUR]cluster_id = "XXXX-XXXXXX-xxxxxxx"
print(dc.cluster_cost(cluster_id=cluster_id, start_time="2020-10-01", end_time="2020-10-31"))# display cluster usage with `seaborn`
cluster_id_1 = "XXXX-XXXXXX-xxxxxx1"
cluster_id_2 = "XXXX-XXXXXX-xxxxxx2"
dc.cluster_running_time_as_sns(cluster_id=[cluster_id_1, cluster_id_2])```