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
Classes
- class Logger(name='', parent=None, format=None)[source]
The taurus logger class. All taurus pertinent classes should inherit directly or indirectly from this class if they need taurus logging facilities.
Functions
- Attribute(dev_or_attr_name, attr_name=None)[source]
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:
- Authority(name=None)[source]
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:
- check_dependencies()[source]
Prints a check-list of requirements and marks those that are fulfilled
- Device(device_name)[source]
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:
- Factory(scheme=None)[source]
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:
- getSchemeFromName(name, implicit=True)[source]
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)[source]
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)[source]
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)
- isValidName(name, etypes=None, strict=None)[source]
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:
- makeSchemeExplicit(name, default=None)[source]
return the name guaranteeing that the scheme is present. If name already contains the scheme, it is returned unchanged.
- Manager()[source]
Returns the one and only TaurusManager
It is a shortcut to:
import taurus.core manager = taurus.core.taurusmanager.TaurusManager()
- Returns:
the TaurusManager
- Return type:
- Object(*args)[source]
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:
Variables
- __version__
- Critical
- Debug
- disableLogOutput
- enableLogOutput
- Error
- getLogFormat
- getLogLevel
- Info
- Release
- resetLogFormat
- resetLogLevel
- setLogFormat
- setLogLevel
- Trace
- TRACE
- Warning