Migration¶
This should 🤞 be easy!
webexpythonsdk is designed to be a drop-in replacement for the webexteamssdk package. The SDK interface and data objects are largely unchanged with only a few minor name changes.
Major changes that you should be aware of:
The package name has changed from
webexteamssdktowebexpythonsdkwebexpythonsdkdrops support for Python v2, and supports Python 3.10+The primary API object has changed from
WebexTeamsAPItoWebexAPI
Migration Guide¶
TL;DR: Update the package dependency, environment variables, imports, and primary API object.
The following table summarizes the name changes that need to be made to migrate from
webexteamssdk to webexpythonsdk:
Old Name |
New Name |
Description |
|---|---|---|
|
|
Package name |
|
|
Primary API object |
|
|
Access token environment variable |
Note: The old WEBEX_TEAMS_ACCESS_TOKEN environment variable should continue to work with the new package; however, you will receive a deprecation warning. It is recommended to update the environment variable name to WEBEX_ACCESS_TOKEN.
Doing a quick search-and-replace in your codebase should be all you need to do to migrate.
Detailed Steps¶
Update Package
Ensure you update the package in your project’s dependencies:
pip uninstall webexteamssdk pip install webexpythonsdk
Update Environment Variables
If you are using the
WEBEX_TEAMS_ACCESS_TOKENenvironment variable, you will need to update it toWEBEX_ACCESS_TOKEN.Codebase Changes
Imports: Replace all imports from
webexteamssdktowebexpythonsdk.Primary API Object: Replace all instances of
WebexTeamsAPIwithWebexAPI.
For Contributors¶
Project changes that you should be aware of:
- Tooling changes:
Using GitHub Actions for CI/CD
Using poetry for packaging and dependency management
Using poetry-dynamic-versioning for version management
Using ruff for linting and code formatting
Using make to automate common tasks
The test suite environment variable names have changed:
Old Environment Variable
New Environment Variable
WEBEX_TEAMS_ACCESS_TOKENWEBEX_ACCESS_TOKENWEBEX_TEAMS_TEST_DOMAINWEBEX_TEST_DOMAINWEBEX_TEAMS_TEST_ID_STARTWEBEX_TEST_ID_STARTWEBEX_TEAMS_TEST_FILE_URLWEBEX_TEST_FILE_URLWEBEX_TEAMS_GUEST_ISSUER_IDWEBEX_GUEST_ISSUER_IDWEBEX_TEAMS_GUEST_ISSUER_SECRETWEBEX_GUEST_ISSUER_SECRET
Copyright (c) 2016-2024 Cisco and/or its affiliates.