4.3. CIM data types
Python classes for representing values of CIM data types, and related conversion functions.
The following table shows how CIM data types are represented in Python. Note that some basic CIM data types are represented with built-in Python types.
CIM data type |
Python type |
---|---|
boolean |
|
char16 |
string
or |
string |
|
string (EmbeddedInstance) |
|
string (EmbeddedObject) |
|
datetime |
|
reference |
|
uint8 |
|
uint16 |
|
uint32 |
|
uint64 |
|
sint8 |
|
sint16 |
|
sint32 |
|
sint64 |
|
real32 |
|
real64 |
|
[] (array) |
|
The CIM NULL value is represented with Python None which can be used for any CIM typed value to represent NULL.
Note that init methods of pywbem classes that take CIM typed values as input
may support Python types in addition to those shown above. For example, the
CIMProperty
class represents property values of CIM datetime
type internally as CIMDateTime
objects, but its init method
accepts py:datetime.timedelta
objects, py:datetime.datetime
objects, string, in addition to
CIMDateTime
objects.