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_class : optional

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

add_param(param, content)[source]

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

Parameters:
param: str

The XML tag name for the parameter.

content : str

The text content for the parameter.

get_query()

Get the root XML Element representing the query.

Returns:
query : Element

The root element of the query.