pygtop.gtop (GtoP Interface)

Functions for interacting with the Guide to PHARMACOLOGY web services.

pygtop.gtop.get_json_from_gtop(query, attempts=5)[source]

Issues a query to the GtoP web services, and returns the resulting JSON.

If it does not get a valid response, it will try again, and if it still doesn’t get JSON back, it will return None.

Parameters:
  • query (str) – The query to append to the base URL.
  • attempts (int) – The number of attempts to make before giving up (default is 5).
Returns:

JSON object or None