wxc_sdk
A simple SDK to work with Webex APIs, special focus on Webex Calling specific API endpoints.
This is how easy it is to use the SDK. The example code list all calling enabled users within the org.
1#!/usr/bin/env python
2"""
3Example script
4Get all calling users within the org
5"""
6
7from dotenv import load_dotenv
8
9from wxc_sdk import WebexSimpleApi
10
11load_dotenv()
12
13api = WebexSimpleApi()
14
15# using wxc_sdk.people.PeopleApi.list to iterate over persons
16# Parameter calling_data needs to be set to true to gat calling specific information
17# calling users have the attribute location_id set
18calling_users = [user for user in api.people.list(calling_data=True)
19 if user.location_id]
20print(f'{len(calling_users)} users:')
21print('\n'.join(user.display_name for user in calling_users))
Documentation
Documentation is available at: https://wxc-sdk.readthedocs.io
Examples
Sample scripts are available in the examples folder.
Also the test cases in the tests folder can serve as examples of how to use the SDK.
Datatypes
Datatypes are defined in the respective subpackages and submodules and have to be imported from there explicitly:
from wxc_sdk.people import Person
from wxc_sdk.person_settings.barge import BargeSettings
To allow to abstract from the subpackage and submodule structure any datatype can also be imported from
wxc_sdk.all_types
directly:
from wxc_sdk.all_types import Person, BargeSettings
All wxc_sdk
data types can also be imported at once:
from wxc_sdk.all_types import *