DALService¶
-
class
pyvo.dal.query.
DALService
(baseurl)[source]¶ Bases:
object
an abstract base class representing a DAL service located a particular endpoint.
instantiate the service connecting it to a base URL
Parameters: baseurl : str
the base URL that should be used for forming queries to the service.
Attributes Summary
baseurl
the base URL identifying the location of the service and where Methods Summary
create_query
(**keywords)create a query object that constraints can be added to and then describe
([verbose, width, file])Print a summary description of this service. search
(**keywords)send a search query to this service. Attributes Documentation
-
baseurl
¶ the base URL identifying the location of the service and where queries are submitted (read-only)
Methods Documentation
-
create_query
(**keywords)[source]¶ create a query object that constraints can be added to and then executed.
Returns: DALQuery
a generic query object
-
describe
(verbose=False, width=78, file=None)[source]¶ Print a summary description of this service.
At a minimum, this will include the service protocol and base URL. If there is metadata associated with this service, the summary will include other information, such as the service title and description.
Parameters: verbose : bool
If false (default), only user-oriented information is printed; if true, additional information will be printed as well.
width : int
Format the description with given character-width.
file : writable file-like object
If provided, write information to this output stream. Otherwise, it is written to standard out.
-
search
(**keywords)[source]¶ send a search query to this service.
This implementation has no knowledge of the type of service being queried. The query parameters are given as arbitrary keywords which will be assumed to be understood by the service (i.e. there is no argument checking). The response is a generic DALResults object.
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
-