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

py:bool

char16

string or Char16

string

string

string (EmbeddedInstance)

CIMInstance

string (EmbeddedObject)

CIMInstance or CIMClass

datetime

CIMDateTime

reference

CIMInstanceName

uint8

Uint8

uint16

Uint16

uint32

Uint32

uint64

Uint64

sint8

Sint8

sint16

Sint16

sint32

Sint32

sint64

Sint64

real32

Real32

real64

Real64

[] (array)

py:list

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.