BaseQueryResponse

class sunpy.net.base_client.BaseQueryResponse[source]

Bases: collections.abc.Sequence

An Abstract Base Class for results returned from BaseClient.

Notes

  • A QueryResponse object must be able to be instantiated with only one iterable argument. (i.e. the __init__ must only have one required argument).

  • The client property 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_table method.

  • __getitem__ must return an instance of the type it was called on. I.e. it must always return an object of type(self).

Attributes Summary

blocks

A collections.abc.Sequence object which contains the records contained within the Query Response.

client

An instance of BaseClient used to generate the results.

Methods Summary

build_table()

Return an astropy.table.Table representation of the query response.

response_block_properties()

Returns a set of class attributes on all the response blocks.

Attributes Documentation

blocks

A collections.abc.Sequence object which contains the records contained within the Query Response.

client

An instance of BaseClient used 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

abstract build_table()[source]

Return an astropy.table.Table representation of the query response.

abstract 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.