DatalinkQuery

class pyvo.dal.adhoc.DatalinkQuery(baseurl, *, id=None, responseformat=None, session=None, **keywords)[source]

Bases: DALQuery

A class for preparing a query to a Datalink 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.

A session can also optionally be passed in that will be used for network transactions made by this object to remote services.

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:
baseurlstr

the Datalink baseurl

idstr

the dataset identifier

responseformatstr

the output format

sessionobject

optional session to use for network requests

Methods Summary

execute([post])

submit the query and return the results as a DatalinkResults instance

from_resource(rows, resource, *[, session])

Creates a instance from a number of records and a Datalink Resource.

Methods Documentation

execute(post=False)[source]

submit the query and return the results as a DatalinkResults 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

classmethod from_resource(rows, resource, *, session=None, **kwargs)[source]

Creates a instance from a number of records and a Datalink Resource.

XML Hierarchy:

<FIELD id="ID">
<FIELD id="srcGroup">

<GROUP name="inputParams">
    <PARAM name="ID" datatype="char" arraysize="*" value=""
        ref="primaryID"/>
    <PARAM name="CALIB" datatype="char" arraysize="*"
        value="FLUX"/>
    <PARAM name="GROUP" datatype="char" arraysize="*" value=""
        ref="srcGroup"/>
</GROUP>