# `taurus`

The main taurus module. It contains a reduced set of wrappers around the real taurus model classes and information regarding the current release.

Submodules

- `taurus.cli`
- `taurus.console`
- `taurus.core`
- `taurus.external`
- `taurus.qt`
- `taurus.tauruscustomsettings`

Classes

class Logger(name='', parent=None, format=None)

  The taurus logger class. All taurus pertinent classes should inherit directly or indirectly from this class if they need taurus logging facilities.

  (more info)

Functions

Attribute(dev_or_attr_name, attr_name=None)

  Returns the taurus attribute for either the pair (device name, attribute name) or full attribute name

  - Attribute(full_attribute_name)

  - Attribute(device_name, attribute_name)

  It is a shortcut to:

      import taurus.core.taurusmanager
      manager = taurus.core.taurusmanager.TaurusManager()
      factory = manager.getFactory()
      attribute  = factory.getAttribute(full_attribute_name)

  or:

      import taurus.core.taurusmanager
      manager = taurus.core.taurusmanager.TaurusManager()
      factory = manager.getFactory()
      device  = factory.getDevice(device_name)
      attribute = device.getAttribute(attribute_name)

  Parameters:

    - dev_or_attr_name (str or TaurusDevice) – the device name or full attribute name

    - attr_name (str) – attribute name

  Returns:

    a taurus attribute

  Return type:

    `taurus.core.taurusattribute.TaurusAttribute`

Authority(name=None)

  Returns a taurus authority

  It is a shortcut to:

      import taurus.core.taurusmanager
      manager = taurus.core.taurusmanager.TaurusManager()
      factory = manager.getFactory()
      db  = factory.getAuthority(dname)

  Parameters:

    name (str or None) – authority name. If None (default) it will return the default authority of the default scheme. For example, if the default scheme is tango, it will return the default TANGO_HOST database

  Returns:

    a taurus authority

  Return type:

    `taurus.core.taurusauthority.TaurusAuthority`

changeDefaultPollingPeriod(period)

check_dependencies()

  Prints a check-list of requirements and marks those that are fulfilled

Configuration(attr_or_conf_name, conf_name=None)

  Deprecated

critical(msg, *args, **kw)

Database(name=None)

  Deprecated

debug(msg, *args, **kw)

deprecated(*args, **kw)

Device(device_name)

  Returns the taurus device for the given device name

  It is a shortcut to:

      import taurus.core.taurusmanager
      manager = taurus.core.taurusmanager.TaurusManager()
      factory = manager.getFactory()
      device  = factory.getDevice(device_name)

  Parameters:

    device_name (str) – the device name

  Returns:

    a taurus device

  Return type:

    `taurus.core.taurusdevice.TaurusDevice`

error(msg, *args, **kw)

Factory(scheme=None)

  Returns the one and only Factory for the given scheme

  It is a shortcut to:

      import taurus.core.taurusmanager
      manager = taurus.core.taurusmanager.TaurusManager()
      factory = manager.getFactory(scheme)

  Parameters:

    scheme (str) – a string representing the scheme. Default value is None meaning `tango` scheme

  Returns:

    a taurus factory

  Return type:

    `taurus.core.taurusfactory.TaurusFactory`

fatal(msg, *args, **kw)

getSchemeFromName(name, implicit=True)

  Return the scheme from a taurus name.

  Parameters:

    - name (str) – taurus model name URI.

    - implicit (bool) – controls whether to return the default scheme (if implicit is True -default-) or None (if implicit is False) in case model does not contain the scheme name explicitly. The default scheme may be defined in Taurus custom settings (‘tango’ is assumed if not defined)

getValidatorFromName(name)

  Helper for obtaining the validator object corresponding to the given name.

  Returns:

    model name validator or None if name is not a supported model name

getValidTypesForName(name, strict=None)

  Returns a list of all Taurus element types for which name is a valid model name (while in many cases a name may only be valid for one element type, this is not necessarily true in general)

  Parameters:

    - name (str) – taurus model name

    - strict (bool) – If True, names that are not RFC3986-compliant but which would be accepted for backwards compatibility are considered valid.

  Returns:

    where element can be one of: Attribute, Device or Authority

  Return type:

    list<TaurusElementType.element>

info(msg, *args, **kw)

isValidName(name, etypes=None, strict=None)

  Returns True is the given name is a valid Taurus model name. If etypes is passed, it returns True only if name is valid for at least one of the given the element types. Otherwise it returns False. For example:

      isValidName('tango:foo')--> True
      isValidName('tango:a/b/c', [TaurusElementType.Attribute]) --> False

  Parameters:

    - name (str) – the string to be checked for validity

    - etypes (seq<TaurusElementType>) – if given, names will only be considered valid if they represent one of the given element types. Supported element types are: Attribute, Device and Authority

    - strict (bool) – If True, names that are not RFC3986-compliant but which would be accepted for backwards compatibility are considered valid.

  Returns:

  Return type:

    bool

log_dependencies()

  deprecated since ‘4.0.4’

makeSchemeExplicit(name, default=None)

  return the name guaranteeing that the scheme is present. If name already contains the scheme, it is returned unchanged.

  Parameters:

    - name (str) – taurus model name URI.

    - default (str) – The default scheme to use. If no default is passed, the one defined in tauruscustomsettings.DEFAULT_SCHEME is used.

  Returns:

    the name with the explicit scheme.

Manager()

  Returns the one and only TaurusManager

  It is a shortcut to:

      import taurus.core
      manager = taurus.core.taurusmanager.TaurusManager()

  Returns:

    the TaurusManager

  Return type:

    `taurus.core.taurusmanager.TaurusManager`

  See also

  `taurus.core.taurusmanager.TaurusManager`

Object(*args)

  Returns an taurus object of given class for the given name

  Can be called as:

  > - Object(name)

  > - Object(cls, name)

  Where:

  > - name is a model name (str)

  > - cls is a class derived from TaurusModel

  If cls is not given, Object() will try to guess it from name.

  Returns:

    a taurus object

  Return type:

    `taurus.core.taurusmodel.TaurusModel`

trace(msg, *args, **kw)

warning(msg, *args, **kw)

Variables

__version__

Critical

Debug

disableLogOutput

enableLogOutput

Error

getLogFormat

getLogLevel

Info

Release

resetLogFormat

resetLogLevel

setLogFormat

setLogLevel

Trace

TRACE

Warning