mbed_cloud.foundation.common.entity_base module

Base Class for Foundation Entities

class mbed_cloud.foundation.common.entity_base.Entity(_client, **kwargs)

Bases: object

Create a new Entity

Parameters:
  • client (Client) –
  • kwargs
from_api(**kwargs)

Load values into object from an API response

from_dict(*args, **kwargs)

Load values into object from a dictionary

Equivalent to a dictionary update method Ignores unknown keys

from_literal(**kwargs)

Load values into object from pure literals

to_api()

Return all fields in API format

to_dict()

Return all fields as key-value pairs

to_literal()

Return all fields from object in a format suitable for serialisation