BaseQueryResponse#
- class sunpy.net.base_client.BaseQueryResponse[source]#
Bases:
SequenceAn Abstract Base Class for results returned from BaseClient.
Notes
A QueryResponse or QueryResponseTable object must be able to be instantiated with only one iterable argument. (i.e. the
__init__must only have one required argument).The
clientproperty must be settable.The base class does not prescribe how you store the results from your client, only that it must be possible to represent them as an astropy table in the
build_tablemethod.__getitem__must return an instance of the type it was called on. I.e. it must always return an object oftype(self).
Attributes Summary
A
collections.abc.Sequenceobject which contains the records contained within the Query Response.An instance of
BaseClientused to generate the results.Methods Summary
Return an
astropy.table.Tablerepresentation of the query response.Returns a set of class attributes on all the response blocks.
show(*cols)Returns response tables with desired columns for the Query.
Attributes Documentation
- blocks#
A
collections.abc.Sequenceobject which contains the records contained within the Query Response.
- client#
An instance of
BaseClientused to generate the results.Generally this is used to fetch the results later.
Note
In general, this doesn’t have to be the same instance of
BaseClient, this is left to the client developer. If there is a significant connection overhead in creating an instance of a client you might want it to be the same instance as used for the search.
Methods Documentation
- abstractmethod build_table()[source]#
Return an
astropy.table.Tablerepresentation of the query response.
- response_block_properties()[source]#
Returns a set of class attributes on all the response blocks.
- Returns:
s (
set) – List of strings, containing attribute names in the response blocks.
- show(*cols)[source]#
Returns response tables with desired columns for the Query.
- Parameters:
*cols (
tuple) – Name of columns to be shown.- Returns:
astropy.table.Table– A table showing values for specified columns.