The first step to use dxflow SDK is to create a session, which requires DiPhyx dashboard username (email) and password.
import dxflow# The credentials are stored in ~/.diphyx/config.yamldxs = dxflow.Session(email="YOUR@EMAIL", password="YOUR_DIPHYX_PASSWORD")
Compute units are the most fundamental entities across DiPhyx products. With dxflow SDK in Python, you have the opportunity to easily manage them. For instance, you can use the following code to list all of your compute units.
# Get the compute managercompute_manager = dxs.get_compute_manager()# List all compute unitscompute_manager.list()# OutputName | Status | IP | Cluster Type | CPU | Memory(GB) | Disk
-----+--------+----------------+--------------+-----+------------+-----
Demo | READY | 52.207.227.207 | AWS:T2 Micro | 1 | 1 | 8
You can manage your unit storage across different providers using dxflow SDK. To start exploring this capability, use the following code to get a list of your available units.
# Get the unitunit = compute_manager.get_unit(name="DEMO")# List all storageunit.storage.ls()# OutputContents of /:
fastqc
run_script.sh