webservices.chebi¶
Substance information from ChEBI.
Queries the ChEBI web service for the information stored for a term, such as the
InChIKey, which can then be used to look up cross references with
pymetadata.webservices.unichem.
See https://www.ebi.ac.uk/chebi/.
ChebiQuery
¶
Queries against the ChEBI web service.
Responses are cached on disk for CACHE_DURATION_ONTOLOGY hours, see
pymetadata.CACHE_USE. If ChEBI cannot be reached, cached content is used
however old it is.
query
staticmethod
¶
Query the information stored for a ChEBI term.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chebi
|
str
|
ChEBI term, e.g., |
required |
cache
|
bool | None
|
cache the response, defaults to |
None
|
cache_path
|
Path | None
|
directory for cached responses, defaults to
|
None
|
Returns:
| Type | Description |
|---|---|
dict
|
The ChEBI information, empty if the term could not be resolved. |