search#
- biotite.database.pubchem.search(query, throttle_threshold=0.5, return_throttle_status=False)[source]#
Get all CIDs that meet the given query requirements, via the PubChem REST API.
This function requires an internet connection.
- Parameters:
- queryQuery
The search query.
- throttle_thresholdfloat or None, optional
A value between 0 and 1. If the load of either the request time or count exceeds this value the execution is halted. See
ThrottleStatusfor more information. IfNoneis given, the execution is never halted.- return_throttle_statusfloat, optional
If set to true, the
ThrottleStatusis also returned.
- Returns:
- idslist of int
List of all compound IDs (CIDs) that meet the query requirement.
- throttle_statusThrottleStatus
The
ThrottleStatusobtained from the server response. This can be used for custom request throttling, for example. Only returned, if return_throttle_status is set to true.
Examples
>>> print(search(NameQuery("Alanine"))) [5950, ..., ...]