TAPQuery¶
-
class
pyvo.dal.tap.
TAPQuery
(baseurl, query, mode='sync', language='ADQL', maxrec=None, uploads=None, **keywords)[source]¶ Bases:
pyvo.dal.query.DALQuery
a class for preparing an query to an TAP service. Query constraints are added via its service type-specific methods. The various execute() functions will submit the query and return the results.
The base URL for the query, which controls where the query will be sent when one of the execute functions is called, is typically set at construction time; however, it can be updated later via the
baseurl
to send a configured query to another service.In addition to the search constraint attributes described below, search parameters can be set generically by name via dict semantics.
The typical function for submitting the query is
execute()
; however, alternate execute functions provide the response in different forms, allowing the caller to take greater control of the result processing.initialize the query object with the given parameters
Parameters: baseurl : str
the TAP baseurl
query : str
the query string
mode : str
the query mode (sync | async). default “sync”
language : str
the query language. defaults to ADQL
maxrec : int
the amount of records to fetch
uploads : dict
Files to upload. Uses table name as key and table content as value.
Attributes Summary
queryurl
Methods Summary
execute
()submit the query and return the results as a TAPResults instance execute_stream
()submit the query and return the raw VOTable XML as a file stream submit
()Does the request part of the TAP query. Attributes Documentation
-
queryurl
¶
Methods Documentation
-
execute
()[source]¶ submit the query and return the results as a TAPResults instance
Raises: DALServiceError
for errors connecting to or communicating with the service
DALQueryError
for errors either in the input query syntax or other user errors detected by the service
DALFormatError
for errors parsing the VOTable response
-