wxc_sdk.base module

wxc_sdk.base.webex_id_to_uuid(webex_id: Optional[str]) Optional[str][source]

Convert a webex id as used by the public APIs to a UUID

Parameters

webex_id (str) – base 64 encoded id as used by public APIs

Returns

ID in uuid format

wxc_sdk.base.to_camel(s: str) str[source]

Convert snake case variable name to camel case log_id -> logId

Parameters

s – snake case variable name

Returns

Camel case name

class wxc_sdk.base.ApiModel[source]

Bases: BaseModel

Base for all models used by the APIs

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

class Config[source]

Bases: object

alias_generator() str

Convert snake case variable name to camel case log_id -> logId

Parameters

s – snake case variable name

Returns

Camel case name

allow_population_by_field_name = True
extra = 'forbid'

set to ‘forbid’ if run in unittest to catch schema issues during tests else set to ‘allow’

json(*args, exclude_none=True, by_alias=True, **kwargs) str[source]

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

classmethod parse_obj(obj)[source]
class wxc_sdk.base.CodeAndReason(*, code: str, reason: str)[source]

Bases: ApiModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

code: str
reason: str
class wxc_sdk.base.ApiModelWithErrors(*, errors: Optional[dict[str, wxc_sdk.base.CodeAndReason]] = None)[source]

Bases: ApiModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

errors: Optional[dict[str, wxc_sdk.base.CodeAndReason]]
wxc_sdk.base.plus1(v: Optional[str]) str[source]

Convert 10D number to +E.164. Can be used as validator :param v: :return:

wxc_sdk.base.dt_iso_str(dt: datetime) str[source]

ISO format datetime as used by Webex API (no time zone, milliseconds) :param dt: :return: