data_downloader.services.hyp3.Jobs#

class data_downloader.services.hyp3.Jobs(jobs: list[Job])#

A class to manage HyP3 jobs. It provides a pythonic interface to filter and select jobs using the numpy and pandas libraries. This class is designed to be used as the jobs attribute of the HyP3Service class.

__init__(jobs: list[Job]) None#

Initialize the Jobs class

Parameters:

jobs (list[sdk.Job]) – List of Job objects from HyP3 SDK. You can get the jobs from the hyp3_sdk.Batch.jobs attribute.

Methods

__init__(jobs)

Initialize the Jobs class

sel([name, job_type, status_code, request_time])

Select jobs based on job type and status code

Attributes

browse_images

the browse images of all jobs

credit_cost

the credit cost of all jobs

expiration_time

the expiration time of all jobs

failed

all failed jobs (not expired by default)

file_names

the file names of all jobs

file_sizes

the file sizes of all jobs

file_urls

the file urls of all jobs

files

the files of all jobs

frame

jobs in the form of a pandas DataFrame

job_id

the job ID of all jobs

job_parameters

the job parameters of all jobs

job_type

the job type of all jobs

logs

the logs of all jobs

name

the name of all jobs

pending

all pending jobs (not expired by default)

processing_times

the processing times of all jobs

request_time

the request time of all jobs

running

all running jobs (not expired by default)

status_code

the status code of all jobs

succeeded

all succeeded jobs (not expired by default)

thumbnail_images

the thumbnail images of all jobs

total_credit_cost

the total credit cost of all jobs

user_id

the user ID of all jobs

__init__(jobs: list[Job]) None#

Initialize the Jobs class

Parameters:

jobs (list[sdk.Job]) – List of Job objects from HyP3 SDK. You can get the jobs from the hyp3_sdk.Batch.jobs attribute.

property job_type: ndarray#

the job type of all jobs

property job_id: ndarray#

the job ID of all jobs

property request_time: ndarray#

the request time of all jobs

property status_code: ndarray#

the status code of all jobs

property user_id: ndarray#

the user ID of all jobs

property name: ndarray#

the name of all jobs

property job_parameters: ndarray#

the job parameters of all jobs

property files: ndarray#

the files of all jobs

property file_names: ndarray#

the file names of all jobs

property file_urls: ndarray#

the file urls of all jobs

property file_sizes: ndarray#

the file sizes of all jobs

property logs: ndarray#

the logs of all jobs

property browse_images: ndarray#

the browse images of all jobs

property thumbnail_images: ndarray#

the thumbnail images of all jobs

property expiration_time: ndarray#

the expiration time of all jobs

property processing_times: ndarray#

the processing times of all jobs

property credit_cost: ndarray#

the credit cost of all jobs

property total_credit_cost: int#

the total credit cost of all jobs

property frame: DataFrame#

jobs in the form of a pandas DataFrame

sel(name: str | None = None, job_type: JobType | None = None, status_code: JobStatus | None = None, request_time: datetime | str | slice | None = None) Jobs#

Select jobs based on job type and status code

Parameters:
  • name (str | None) – Name of the job to filter by

  • job_type (JobType | None) – Job type to filter by

  • status_code (JobStatus | None) – Status code to filter by

  • request_time (datetime | str | slice | None) – Request time to filter by. Can be a datetime object, a string, or a slice object. If a slice object is used, the start must be a string or a datetime object, and the stop can be None, a string, or a datetime object. If a string is used, it must be in the format that can be converted to a datetime object using pd.to_datetime. by default None

property succeeded: Jobs#

all succeeded jobs (not expired by default)

property failed: Jobs#

all failed jobs (not expired by default)

property pending: Jobs#

all pending jobs (not expired by default)

property running: Jobs#

all running jobs (not expired by default)