otp.databases#

databases(context=utils.default, derived=False, readable_only=True, fetch_description=False)#

Gets all available databases in the context

Parameters
  • context (str, optional) – Context to run the query. If not set then default context is used. See guide about switching contexts for examples.

  • derived (bool, dict) – If False (default) then derived databases are not returned. Otherwise derived databases names are added to the result after the non-derived databases. If set to dict then its items used as parameters to derived_databases(). If set to True then default parameters for derived_databases() are used.

  • readable_only (bool) – If set to True (default), then return only the databases with read-access for the current user. Otherwise return all databases visible from the current process.

  • fetch_description (bool) – If set to True, retrieves descriptions for databases and puts them into description property of DB objects in a returned dict.

Returns

Dict where keys are database names and values are DB objects with context specified.

Return type

dict

See also

SHOW_DB_LIST OneTick event processor
ACCESS_INFO OneTick event processor