Package pywbem :: Module cim_types
[frames] | no frames]

Module cim_types

source code

Types to represent CIM typed values, and related conversion functions.

The following table shows how CIM typed values are represented as Python objects:

CIM type Python type
boolean bool
char16 unicode string or binary bytes, see (1)
string unicode string or binary bytes, see (1)
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) list

(1) CIM string and char16 types are represented as follows: In Python 2 as unicode (preferred) or str; in Python 3 as str (preferred) or bytes. The implementation may decode binary bytes types offered at the interface to unicode text types in the internal representation, using "utf-8" encoding.

Note that constructors 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 CIM datetime values internally as a CIMDateTime object, but its constructor accepts datetime.timedelta, datetime.datetime, str, and unicode (py2 only) objects in addition to CIMDateTime objects.

Classes
  MinutesFromUTC
A datetime.tzinfo implementation defined using a fixed offset in +/- minutes from UTC.
  CIMType
Base type for numeric and datetime CIM types.
  CIMDateTime
A value of CIM type datetime.
  CIMInt
Base type for integer CIM types.
  Uint8
A value of CIM type uint8.
  Sint8
A value of CIM type sint8.
  Uint16
A value of CIM type uint16.
  Sint16
A value of CIM type sint16.
  Uint32
A value of CIM type uint32.
  Sint32
A value of CIM type sint32.
  Uint64
A value of CIM type uint64.
  Sint64
A value of CIM type sint64.
  CIMFloat
Base type for real (floating point) CIM types.
  Real32
A value of CIM type real32.
  Real64
A value of CIM type real64.