A python wrapper around the HyP3 API
Project description
HyP3 SDK
A python wrapper around the HyP3 API
Usage
The HyP3 object
The HyP3 object interactions with the HyP3 API are done using an instance of the HyP3 class
from hyp3_sdk import HyP3
api = HyP3() # Must have credentials for urs.earthdata.nasa.gov in a .netrc file for this to work
If you want to use an API other then the one at https://hyp3-api.asf.alaska.edu, you may provide the URL (including scheme) as a parameter
from hyp3_sdk import HyP3
api = HyP3('https://hyp3.example.com')
If you want to pass in a Requests Session object for the API to use, it must first be authenticated and then it can be passed into the API
import requests
from hyp3_sdk import HyP3
session = requests.Session()
session.get(...) # Authenticate
api = HyP3(authenticated_session=session)
Getting jobs
The get_jobs method with request all jobs from the API and return them in a list of dictionaries
from hyp3_sdk import HyP3
api = HyP3()
response = api.get_jobs()
Parameters:
start:datetime-> requests only jobs submitted after given timeend:datetime-> requests only jobs submitted before given timestatus:str-> request based on status (SUCCEEDED,FAILED,RUNNING,PENDING)name:str-> requests only jobs that have this name
Submitting jobs
The submit_jobs method will submit jobs to the API for processing
from hyp3_sdk import HyP3, make_rtc_gamma_job
api = HyP3()
jobs = [make_rtc_gamma_job('job_name', 'granule_name')]
response = api.submit_jobs(jobs)
Parameters
jobs:list[Job]-> list of job objects to submit to API
The Job object
Job objects represent a job to be submitted to the API, they are made by calling factory functions
Job factories
-
make_rtc_gamma_jobParameters
job_name:str-> name of jobgranule:str-> name of granule to processextra_parameters:dict-> extra parameters and processing options
-
make_insar_gamma_jobParameters
job_name:str-> name of jobgranule1:str-> name of primary granule to processgranule2:str-> name of secondary granule to processextra_parameters:dict-> extra parameters and processing options
-
make_autorift_jobParameters
job_name:str-> name of jobgranule1:str-> name of primary granule to processgranule2:str-> name of secondary granule to processextra_parameters:dict-> extra parameters and processing options
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hyp3_sdk-0.2.1.tar.gz.
File metadata
- Download URL: hyp3_sdk-0.2.1.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d07dade0201b5ce820ad3bef97ef557bc6a8ed3ad6daaa60da87bd6b51c279b6
|
|
| MD5 |
4919c786fc5873961a73af810d9c5a7e
|
|
| BLAKE2b-256 |
e2bbf8b053b54fe6006c6c908334190397e1c1897f70147e45e25700ce8becef
|
File details
Details for the file hyp3_sdk-0.2.1-py3-none-any.whl.
File metadata
- Download URL: hyp3_sdk-0.2.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e721b7f0337325a569a96dbea5947659f8b3ad63db625355ad1648448e9e7fd4
|
|
| MD5 |
bdbdeec0056d7510a18c04557b510444
|
|
| BLAKE2b-256 |
b73aa51d3dad9aea26d903be129ce4e543aa152b910d5ededbecf966fdadc868
|