blpapi.Constant
- class blpapi.Constant(handle, sessions)
Represents the value of a schema enumeration constant.
Constants can be any of the following
DataTypes:BOOL,CHAR,BYTE,INT32,INT64,FLOAT32,FLOAT64,STRING,DATE,TIME,DATETIME. This class provides access not only to to the constant value, but also to the symbolic name, the description, and the status of the constant.Constantobjects are read-only.Application clients never create
Constantobject directly; applications will typically work withConstantobjects returned by otherblpapicomponents.- getValueAsDatetime()
- Return type
- Returns
Value of this object as one of the datetime types.
- Raises
InvalidConversionException – If the value cannot be converted to one of the datetime types.
- getValueAsFloat()
- Return type
- Returns
Value of this object as a float.
- Raises
InvalidConversionException – If the value cannot be converted to a float.
- getValueAsInteger()
- Return type
- Returns
Value of this object as an integer.
- Raises
InvalidConversionException – If the value cannot be converted to an integer.
- getValueAsString()
- Return type
- Returns
Value of this object as a string.
- Raises
InvalidConversionException – If the value cannot be converted to a string.
- status()
-
The possible return values are enumerated in
SchemaStatus.