biotite.database.rcsb.SimpleQuery

class biotite.database.rcsb.SimpleQuery(query_type, parameter_class='')[source]

Bases: biotite.database.rcsb.search.Query

The abstract base class for all non-composite queries.

Offers the convenient add_param() method for simple creation of custom queries.

Parameters
query_type: str

The name of the query type. This is the suffix for the ‘QueryType’ XML tag.

parameter_classoptional

If specifed, this string is the prefix for all parameters (XML tags) of the query.

add_param(self, param, content)[source]

Add a parameter (XML tag/text pair) to the query.

Parameters
param: str

The XML tag name for the parameter.

contentstr

The text content for the parameter.

get_query(self)

Get the root XML Element representing the query.

Returns
queryElement

The root element of the query.