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
- urlstr, mandatory if no host is specified, default None
TAP URL
- hoststr, optional, default None
host name
- server_contextstr, mandatory, default None
server context
- tap_contextstr, mandatory, default None
tap context
- upload_contextstr, optional, default None
upload context
- table_edit_contextstr, mandatory, default None
context for all actions to be performed over a existing table
- data_contextstr, optional, default None
data context
- datalink_contextstr, optional, default None
datalink context
- portint, optional, default ‘80’
HTTP port
- sslportint, optional, default ‘443’
HTTPS port
- default_protocol_is_httpsbool, optional, default False
Specifies whether the default protocol to be used is HTTPS
- connhandlerconnection handler object, optional, default None
HTTP(s) connection hander (creator). If no handler is provided, a new one is created.
- verbosebool, 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
- querystr, mandatory
query to be executed
- namestr, optional, default None
custom name defined by the user for the job that is going to be created
- output_filestr, 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_formatstr, optional, default ‘votable’
results format
- verbosebool, optional, default ‘False’
flag to display information about the process
- dump_to_filebool, optional, default ‘False’
if True, the results are saved in a file instead of using memory
- upload_resourcestr, optional, default None
resource to be uploaded to UPLOAD_SCHEMA
- upload_table_namestr, 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
- querystr, mandatory
query to be executed
- namestr, optional, default None
custom name defined by the user for the job that is going to be created
- output_filestr, 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_formatstr, optional, default ‘votable’
results format
- verbosebool, optional, default ‘False’
flag to display information about the process
- dump_to_filebool, optional, default ‘False’
if True, the results are saved in a file instead of using memory
- backgroundbool, optional, default ‘False’
when the job is executed in asynchronous mode, this flag specifies whether the execution will wait until results are available
- upload_resourcestr, optional, default None
resource to be uploaded to UPLOAD_SCHEMA
- upload_table_namestr, optional, default None
resource temporary table name associated to the uploaded resource. This argument is required if upload_resource is provided.
- autorunboolean, 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
- verbosebool, 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
- jobidstr, mandatory if no name is provided, default None
job identifier
- namestr, mandatory if no jobid is provided, default None
job name
- verbosebool, optional, default ‘False’
flag to display information about the process
- load_resultsbool, optional, default ‘True’
load results associated to this job
- Returns
- A Job object
- load_table(table, verbose=False)[source]¶
Loads the specified table
- Parameters
- tablestr, mandatory
full qualified table name (i.e. schema name + table name)
- verbosebool, optional, default ‘False’
flag to display information about the process
- Returns
- A table object