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
the browse images of all jobs
the credit cost of all jobs
the expiration time of all jobs
all failed jobs (not expired by default)
the file names of all jobs
the file sizes of all jobs
the file urls of all jobs
the files of all jobs
jobs in the form of a pandas DataFrame
the job ID of all jobs
the job parameters of all jobs
the job type of all jobs
the logs of all jobs
the name of all jobs
all pending jobs (not expired by default)
the processing times of all jobs
the request time of all jobs
all running jobs (not expired by default)
the status code of all jobs
all succeeded jobs (not expired by default)
the thumbnail images of all jobs
the total credit cost of all jobs
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