Tap¶
-
class
astroquery.utils.tap.
Tap
(url=None, host=None, server_context=None, tap_context=None, port=80, sslport=443, default_protocol_is_https=False, connhandler=None, upload_context=None, table_edit_context=None, data_context=None, datalink_context=None, verbose=False)[source]¶ Bases:
object
TAP class Provides TAP capabilities
Constructor
- Parameters
url : str, mandatory if no host is specified, default None
TAP URL
host : str, optional, default None
host name
server_context : str, mandatory, default None
server context
tap_context : str, mandatory, default None
tap context
upload_context : str, optional, default None
upload context
table_edit_context : str, mandatory, default None
context for all actions to be performed over a existing table
data_context : str, optional, default None
data context
datalink_context : str, optional, default None
datalink context
port : int, optional, default ‘80’
HTTP port
sslport : int, optional, default ‘443’
HTTPS port
default_protocol_is_https : bool, optional, default False
Specifies whether the default protocol to be used is HTTPS
connhandler : connection handler object, optional, default None
HTTP(s) connection hander (creator). If no handler is provided, a new one is created.
verbose : bool, optional, default ‘False’
flag to display information about the process
Methods Summary
launch_job
(query[, name, output_file, …])Launches a synchronous job
launch_job_async
(query[, name, output_file, …])Launches an asynchronous job
list_async_jobs
([verbose])Returns all the asynchronous jobs
load_async_job
([jobid, name, verbose, …])Loads an asynchronous job
load_table
(table[, verbose])Loads the specified table
load_tables
([verbose])Loads all public tables
save_results
(job[, verbose])Saves job results
Methods Documentation
-
launch_job
(query, name=None, output_file=None, output_format='votable', verbose=False, dump_to_file=False, upload_resource=None, upload_table_name=None)[source]¶ Launches a synchronous job
- Parameters
query : str, mandatory
query to be executed
output_file : str, optional, default None
file name where the results are saved if dumpToFile is True. If this parameter is not provided, the jobid is used instead
output_format : str, optional, default ‘votable’
results format
verbose : bool, optional, default ‘False’
flag to display information about the process
dump_to_file : bool, optional, default ‘False’
if True, the results are saved in a file instead of using memory
upload_resource : str, optional, default None
resource to be uploaded to UPLOAD_SCHEMA
upload_table_name : str, optional, default None
resource temporary table name associated to the uploaded resource. This argument is required if upload_resource is provided.
- Returns
A Job object
-
launch_job_async
(query, name=None, output_file=None, output_format='votable', verbose=False, dump_to_file=False, background=False, upload_resource=None, upload_table_name=None, autorun=True)[source]¶ Launches an asynchronous job
- Parameters
query : str, mandatory
query to be executed
output_file : str, optional, default None
file name where the results are saved if dumpToFile is True. If this parameter is not provided, the jobid is used instead
output_format : str, optional, default ‘votable’
results format
verbose : bool, optional, default ‘False’
flag to display information about the process
dump_to_file : bool, optional, default ‘False’
if True, the results are saved in a file instead of using memory
background : bool, optional, default ‘False’
when the job is executed in asynchronous mode, this flag specifies whether the execution will wait until results are available
upload_resource : str, optional, default None
resource to be uploaded to UPLOAD_SCHEMA
upload_table_name : str, optional, default None
resource temporary table name associated to the uploaded resource. This argument is required if upload_resource is provided.
autorun : boolean, optional, default True
if ‘True’, sets ‘phase’ parameter to ‘RUN’, so the framework can start the job.
- Returns
A Job object
-
list_async_jobs
(verbose=False)[source]¶ Returns all the asynchronous jobs
- Parameters
verbose : bool, optional, default ‘False’
flag to display information about the process
- Returns
A list of Job objects
-
load_async_job
(jobid=None, name=None, verbose=False, load_results=True)[source]¶ Loads an asynchronous job
- Parameters
jobid : str, mandatory if no name is provided, default None
job identifier
name : str, mandatory if no jobid is provided, default None
job name
verbose : bool, optional, default ‘False’
flag to display information about the process
load_results : bool, optional, default ‘True’
load results associated to this job
- Returns
A Job object
-
load_table
(table, verbose=False)[source]¶ Loads the specified table
- Parameters
table : str, mandatory
full qualified table name (i.e. schema name + table name)
verbose : bool, optional, default ‘False’
flag to display information about the process
- Returns
A table object