Skip to content

Instantly share code, notes, and snippets.

@jreadey
Last active March 7, 2024 22:22
Show Gist options
  • Save jreadey/3375167de54b4662898a0bd11e13ae90 to your computer and use it in GitHub Desktop.
Save jreadey/3375167de54b4662898a0bd11e13ae90 to your computer and use it in GitHub Desktop.
Send a DN request to HSDS
import requests
params = {
's3path': 's3://nrel-pds-sup3rcc/test/sup3rcc_conus_ecearth3_ssp585_r1i1p1f1_pressure_2017.h5',
's3offset': 41943916408,
's3size': 2000000,
'bucket': 'nrel-pds-hsds-dev',
'select': '[0:760,67:68]'
}
endpoint = "http://localhost:32774"
req = endpoint + "/chunks/c-0a6b4cc3-861b2230-b925-f0773c-5dc153_4_2469"
rsp = requests.get(req, params=params)
print(rsp.status_code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment