AsyncTAPJob

class pyvo.dal.AsyncTAPJob(url, session=None)[source]

Bases: object

This class represents a UWS TAP Job.

initialize the job object with the given url and fetch remote values

Parameters:
url : str

the job url

Attributes Summary

destruction datetime after which the job results are deleted automatically.
execution_duration maximum execution duration as ~`astropy.time.TimeDelta`
job all up-to-date uws job infos as dictionary
job_id the job id
owner job owner (if applicable)
phase the current query phase
query the job query
quote estimated runtime
result The job result if exists
result_uri the uri of the result
result_uris a list of the last result uri’s
results The job results if exists
url the job url
uws_version

Methods Summary

abort(self) aborts the job / change phase to ABORT
create(baseurl, query[, language, maxrec, …]) creates a async tap job on the server under baseurl
delete(self) deletes the job.
fetch_result(self) returns the result votable if query is finished
raise_if_error(self) raise a exception if theres an error
run(self) starts the job / change phase to RUN
upload(self, **kwargs) upload a table to the job.
wait(self[, phases, timeout]) waits for the job to reach the given phases.

Attributes Documentation

destruction

datetime after which the job results are deleted automatically. read-write

execution_duration

maximum execution duration as ~`astropy.time.TimeDelta`

job

all up-to-date uws job infos as dictionary

job_id

the job id

owner

job owner (if applicable)

phase

the current query phase

query

the job query

quote

estimated runtime

result

The job result if exists

result_uri

the uri of the result

result_uris

a list of the last result uri’s

results

The job results if exists

url

the job url

uws_version

Methods Documentation

abort(self)[source]

aborts the job / change phase to ABORT

classmethod create(baseurl, query, language='ADQL', maxrec=None, uploads=None, session=None, **keywords)[source]

creates a async tap job on the server under baseurl

Parameters:
baseurl : str

the TAP baseurl

query : str

the query string

language : str

specifies the query language, default ADQL. useful for services which allow to use the backend query language.

maxrec : int

the maximum records to return. defaults to the service default

uploads : dict

a mapping from table names to objects containing a votable

session : object

optional session to use for network requests

delete(self)[source]

deletes the job. this object will become invalid.

fetch_result(self)[source]

returns the result votable if query is finished

raise_if_error(self)[source]

raise a exception if theres an error

Raises:
DALQueryError

if theres an error

run(self)[source]

starts the job / change phase to RUN

upload(self, **kwargs)[source]

upload a table to the job. the job must not been started.

wait(self, phases=None, timeout=600.0)[source]

waits for the job to reach the given phases.

Parameters:
phases : list

phases to wait for

Raises:
DALServiceError

if the job is in a state that won’t lead to an result