AsyncTAPJob

class pyvo.dal.tap.AsyncTAPJob(url)[source]

Bases: object

This class represents a UWS TAP Job.

initialize the job object with the given url and fetch the 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. read-write
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
quote estimated runtime
result_uri the first result uri
result_uris a list of the last result uri’s
url the job url
uws_version

Methods Summary

abort() aborts the job / change phase to ABORT
create(baseurl, query[, language, maxrec, …]) creates a async tap job on the server under baseurl
delete() deletes the job. this object will become invalid.
fetch_result() returns the result votable if query is finished
raise_if_error() raise a exception if theres an error
run() starts the job / change phase to RUN
wait([phases]) 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. read-write

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

quote

estimated runtime

result_uri

the first result uri

result_uris

a list of the last result uri’s

url

the job url

uws_version

Methods Documentation

abort()[source]

aborts the job / change phase to ABORT

classmethod create(baseurl, query, language='ADQL', maxrec=None, uploads=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

specifies the maximum records to return. defaults to the service default

uploads : dict

a mapping from table names to file like objects containing a votable

delete()[source]

deletes the job. this object will become invalid.

fetch_result()[source]

returns the result votable if query is finished

raise_if_error()[source]

raise a exception if theres an error

Raises:

DALQueryError

if theres an error

run()[source]

starts the job / change phase to RUN

wait(phases=None)[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