pdbsearch.schema

pdbsearch.schema.fetch_names_from_rcsb_schema(chemical=False, timeout=None)[source]

Fetches the schema description object for either the text or text_chem service, and processes them down to the minimum information pdbsearch needs.

Parameters:
  • chemical – Whether to fetch the chemical schema.

  • timeout – Optional timeout for the request in seconds.

Return type:

dict

pdbsearch.schema.update_terms_from_api()[source]

Attempts to update the terms in the terms module, using cached values if available and not expired, otherwise fetching from the RCSB API. This function is called at import time and fails silently if the API is unreachable or returns invalid data.

Returns True if both schemas were updated, False otherwise.

Return type:

bool

pdbsearch.schema.clear_cached_terms()[source]

Clears the cached terms.