Skip to content

Commit c43336f

Browse files
committed
Update docs
- Add migration guide - Update contributor page - Update README - Correct some formatting issues
1 parent 2088de8 commit c43336f

File tree

4 files changed

+192
-60
lines changed

4 files changed

+192
-60
lines changed

README.rst

Lines changed: 51 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,19 @@ webexpythonsdk
1313
.. image:: https://readthedocs.org/projects/webexpythonsdk/badge/?version=latest
1414
:target: http://webexpythonsdk.readthedocs.io/en/latest/?badge=latest
1515

16-
------------------------------------------------------------------------------------------------------------------------
16+
---------------------------------------------------------------------------------------------------
1717

18+
Welcome to the new **webexpythonsdk** library! The latest release removes support for Python v2 and
19+
is compatible with Python v3.10+. The new Webex Python SDK replaces the previous `webexteamssdk`_;
20+
and with the exception of the Python version support and the name change, the two libraries are
21+
functionally equivalent. The new library is the recommended choice for new projects, and
22+
webexteamssdk users are encouraged to `migrate`_ to **webexpythonsdk**.
1823

19-
**webexpythonsdk** v1.7 will be the last 🤞 release of the `webexpythonsdk` package. This will be the last release
20-
supporting Python v2 and v3 compatibility; it is compatible Python v3 releases *up to Python v3.10*.
24+
---------------------------------------------------------------------------------------------------
2125

22-
Going forward, the `webexpythonsdk` package will be replaced by the `WebexPythonSDK` package, which will support Python
23-
v3.10+.
2426

25-
------------------------------------------------------------------------------------------------------------------------
26-
27-
28-
**webexpythonsdk** is a *community developed* Python library for working with the Webex APIs. Our goal is to make
29-
working with Webex in Python a *native* and *natural* experience!
27+
**webexpythonsdk** is a *community developed* Python library for working with the Webex APIs. Our
28+
goal is to make working with Webex in Python a *native* and *natural* experience!
3029

3130
.. code-block:: Python
3231
@@ -55,8 +54,8 @@ working with Webex in Python a *native* and *natural* experience!
5554
files=["https://www.webex.com/content/dam/wbx/us/images/navigation/CiscoWebex-Logo_white.png"])
5655
5756
58-
That's more than 6 Webex API calls in less than 23 lines of code (with comments and whitespace), and likely more
59-
than that, since webexpythonsdk handles pagination_ for you automatically!
57+
That's more than 6 Webex API calls in less than 23 lines of code (with comments and whitespace),
58+
and likely more than that, since webexpythonsdk handles pagination_ for you automatically!
6059

6160
webexpythonsdk makes your life better... `Learn how!`__
6261

@@ -70,8 +69,8 @@ webexpythonsdk does all of this for you:
7069

7170
* Transparently sources your Webex access token from your local environment
7271

73-
* Provides and uses default arguments and settings everywhere possible, so you don't have to think about things like API
74-
endpoint URLs, HTTP headers and JSON formats
72+
* Provides and uses default arguments and settings everywhere possible, so you don't have to think
73+
about things like API endpoint URLs, HTTP headers and JSON formats
7574

7675
* Represents all Webex API interactions using native Python tools
7776

@@ -130,57 +129,71 @@ __ Contribution_
130129
Release Notes
131130
-------------
132131

133-
Please see the releases_ page for release notes on the incremental functionality and bug fixes incorporated into the
134-
published releases.
132+
Please see the releases_ page for release notes on the incremental functionality and bug fixes
133+
incorporated into the published releases.
135134

136135

137136
Questions, Support & Discussion
138137
-------------------------------
139138

140-
webexpythonsdk is a *community developed* and *community-supported* project. If you experience any issues using this
141-
package, please report them using the issues_ page.
139+
webexpythonsdk is a *community developed* and *community-supported* project. If you experience any
140+
issues using this package, please report them using the issues_ page.
142141

143-
Please join the `Python Webex Devs`__ Webex space to ask questions, join the discussion, and share your
144-
projects and creations.
142+
Please join the `Python Webex Devs`__ Webex space to ask questions, join the discussion, and share
143+
your projects and creations.
145144

146145
__ Community_
147146

148147

149148
Contribution
150149
------------
151150

152-
webexpythonsdk is a community development project. Feedback, thoughts, ideas, and code contributions are welcome!
153-
Please see the `Contributing`_ guide for more information.
151+
webexpythonsdk is a community development project. Feedback, thoughts, ideas, and code
152+
contributions are welcome! Please see the `Contributing`_ guide for more information.
154153

155154

156155
History
157156
-------
158157

159-
The Webex Python SDK (webexpythonsdk) library started as Cisco Spark API (ciscosparkapi). We updated the library's name in
160-
alignment with Cisco's re-brand of Cisco Spark to Webex. The Cisco Spark API library has been deprecated and is no
161-
longer supported; however, its open-source codebase is still available in the `ciscosparkapi`_ branch of this
162-
repository.
158+
The Webex Python SDK (webexpythonsdk) library started as Cisco Spark API (ciscosparkapi) which
159+
became Webex Teams SDK and then Webex Python SDK (webexpythonsdk). We updated the library's name in
160+
alignment with Cisco's re-brand of Cisco Spark to Webex and then again to align the name with the
161+
broader set of Webex APIs accessible via the SDK (meetings, recordings, etc.). The previous
162+
versions of the library are deprecated and no longer supported; however, their open-source codebase
163+
is still available in the `release/v0/ciscosparkapi`_ and `release/v1/webexteamssdk`_ branches in
164+
this repository.
165+
166+
* `webexpythonsdk`_ (current) is compatible with Python v3.10+ and is the recommended library for
167+
new projects.
163168

164-
The development team may make additional name changes as the library evolves with the Webex APIs published on
165-
developer.webex.com.
169+
* `webexteamssdk`_ (deprecated) is compatible with Python v2 and v3 (<= v3.10) and is still
170+
available for existing projects. Users are encouraged to migrate to `webexpythonsdk`_.
171+
172+
* `ciscosparkapi`_ (deprecated) is compatible with Python v2 and v3 (<= v3.6) and should no longer
173+
be used.
166174

167175

168176
*Copyright (c) 2016-2024 Cisco and/or its affiliates.*
169177

170178

171-
.. _Release Plan: https://github.com/WebexCommunity/WebexPythonSDK/wiki/Release-Plans
172-
.. _Introduction: http://webexpythonsdk.readthedocs.io/en/latest/user/intro.html
173-
.. _pagination: https://developer.webex.com/docs/basics#pagination
174-
.. _webexpythonsdk.readthedocs.io: https://webexpythonsdk.readthedocs.io
175-
.. _Quickstart: http://webexpythonsdk.readthedocs.io/en/latest/user/quickstart.html
179+
.. _ciscosparkapi: `_release/v0/ciscosparkapi`_
180+
.. _Community: https://eurl.io/#HkMxO-_9-
181+
.. _Contributing: https://github.com/WebexCommunity/WebexPythonSDK/blob/master/docs/contributing.rst
176182
.. _examples: https://github.com/WebexCommunity/WebexPythonSDK/tree/master/examples
177-
.. _webexpythonsdk: https://github.com/WebexCommunity/WebexPythonSDK
183+
.. _Introduction: http://webexpythonsdk.readthedocs.io/en/latest/user/intro.html
178184
.. _issues: https://github.com/WebexCommunity/WebexPythonSDK/issues
179-
.. _Community: https://eurl.io/#HkMxO-_9-
185+
.. _migrate: https://webexpythonsdk.readthedocs.io/en/latest/user/migrate.html
186+
.. _pagination: https://developer.webex.com/docs/basics#pagination
180187
.. _projects: https://github.com/WebexCommunity/WebexPythonSDK/projects
188+
.. _pull request: `pull requests`_
181189
.. _pull requests: https://github.com/WebexCommunity/WebexPythonSDK/pulls
190+
.. _Quickstart: http://webexpythonsdk.readthedocs.io/en/latest/user/quickstart.html
191+
.. _Release Plan: https://github.com/WebexCommunity/WebexPythonSDK/wiki/Release-Plans
192+
.. _release/v0/ciscosparkapi: https://github.com/WebexCommunity/WebexPythonSDK/tree/release/v0/ciscosparkapi
193+
.. _release/v1/webexteamssdk: https://github.com/WebexCommunity/WebexPythonSDK/tree/release/v1/webexteamssdk
182194
.. _releases: https://github.com/WebexCommunity/WebexPythonSDK/releases
183195
.. _the repository: webexpythonsdk_
184-
.. _pull request: `pull requests`_
185-
.. _Contributing: https://github.com/WebexCommunity/WebexPythonSDK/blob/master/docs/contributing.rst
186-
.. _ciscosparkapi: https://github.com/CiscoDevNet/ciscosparkapi/tree/ciscosparkapi
196+
.. _webexpythonsdk: https://github.com/WebexCommunity/WebexPythonSDK
197+
.. _webexpythonsdk: https://github.com/WebexCommunity/WebexPythonSDK
198+
.. _webexpythonsdk.readthedocs.io: https://webexpythonsdk.readthedocs.io
199+
.. _webexteamssdk: `_release/v1/webexteamssdk`_

docs/contributing.rst

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,15 @@ How to contribute Feedback, Issues, Thoughts and Ideas
1212

1313
Please use the `issues`_ page to report issues or post ideas for enhancement.
1414

15-
Join our `Webex Python SDK - Python Community Contributors <https://eurl.io/#BJ0A8gfOQ>`_ Webex space to join the conversation with other contributors to this project.
16-
17-
1815

1916
Interested in Contributing Code?
2017
================================
2118

2219

23-
Developer Scripts
24-
-----------------
20+
Common Developer Tasks
21+
----------------------
2522

26-
We have created some scripts to automate everyday actions needed when working on the project. Please see the `script`_ directory, and it's README for more information.
23+
See the project's `Makefile` targets for a list of common developer tasks, which you can run by simply running `make <target>` from the repository root directory.
2724

2825

2926
Notes on the Test Suite
@@ -41,19 +38,28 @@ Contributing Code
4138

4239
2. Fork a copy of the `repository`_ and clone your forked repository to your development environment.
4340

44-
3. Run ``script/setup`` to install the development dependencies and setup your environment.
41+
3. Use the ``setup`` target to install the project dependencies and setup your environment for development.
42+
43+
.. code-block:: bash
44+
45+
make setup
4546
46-
4. Configure the following environment variables in your development environment:
47+
4. Add your code to your forked repository.
4748

48-
* ``WEBEX_ACCESS_TOKEN`` - Your test account's Webex access token.
49+
If you are creating some new feature or functionality (excellent!), please also write tests to verify that your code works as expected.
4950

50-
5. Add your code to your forked repository.
51+
5. Please format your code and make sure your code passes the linter.
5152

52-
If you are creating some new feature or functionality (excellent!), please also write a `test`_ to verify that your code works as expected.
53+
.. code-block:: bash
5354
54-
6. We follow `PEP8`_ reasonably strictly for this project. Please make sure your code passes the linter.
55+
make format
56+
make lint
5557
56-
Run ``script/test lint`` or simply run ``flake8`` from the project root.
58+
6. If you running the test suite locally, ensure your code passes all of the default tests. Use the ``test`` target and ensure all tests execute successfully.
59+
60+
.. code-block:: bash
61+
62+
make test
5763
5864
7. Commit your changes.
5965

@@ -63,7 +69,7 @@ Contributing Code
6369
Running the Test Suite Locally
6470
------------------------------
6571

66-
Configure the following environment variables in your development environment:
72+
To run the test suite locally, you must configure the following environment variables in your development environment:
6773

6874
* ``WEBEX_ACCESS_TOKEN`` - Your test account's Webex access token.
6975

@@ -83,12 +89,17 @@ Configure the following environment variables in your development environment:
8389
export WEBEX_TEST_ID_START=42
8490
export WEBEX_TEST_FILE_URL="https://www.webex.com/content/dam/wbx/us/images/navigation/CiscoWebex-Logo_white.png"
8591
86-
Ensure your code passes all of the default tests. Run ``script/test`` and ensure all tests execute successfully.
92+
If you are updating or testing the guest issuer functionality, you will also need to configure the following environment variables:
93+
94+
* ``WEBEX_GUEST_ISSUER_ID`` - The issuer ID for the guest issuer account.
95+
* ``WEBEX_GUEST_ISSUER_SECRET`` - The issuer secret for the guest issuer account.
96+
97+
98+
Ensure your code passes all of the default tests. Run ``make test`` and ensure all tests execute successfully.
8799

88100

89101
.. _script: https://github.com/WebexCommunity/WebexPythonSDK/tree/master/script
90102
.. _issues: https://github.com/WebexCommunity/WebexPythonSDK/issues
91103
.. _repository: https://github.com/WebexCommunity/WebexPythonSDK
92104
.. _test: https://github.com/WebexCommunity/WebexPythonSDK/tree/master/tests
93-
.. _PEP8: https://www.python.org/dev/peps/pep-0008/
94105
.. _pull request: https://github.com/WebexCommunity/WebexPythonSDK/pulls

docs/index.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
.. currentmodule:: webexpythonsdk
22

3-
=============
4-
webexpythonsdk
5-
=============
3+
==============
4+
WebexPythonSDK
5+
==============
66

77
*Simple, lightweight, scalable Python API wrapper for the Webex APIs*
88

99
-------------------------------------------------------------------------------
1010

11-
Welcome to the docs! webexpythonsdk is a *community developed* Pythonic wrapping of the Webex APIs. The package represents all of the Cisco Webex API interactions via native Python tools. Making working with the Cisco Webex APIs in Python a *native* and *natural* experience.
11+
Welcome to the docs! ``webexpythonsdk`` is a *community developed* Pythonic wrapping of the Webex APIs. The package represents all of the Cisco Webex API interactions via native Python tools. Making working with the Cisco Webex APIs in Python a *native* and *natural* experience.
1212

13-
**webexpythonsdk helps you get things done faster.** We take care of the API semantics, and you can focus on writing your code.
13+
``webexpythonsdk`` **helps you get things done faster.** We take care of the API semantics, and you can focus on writing your code.
1414

15-
With webexpythonsdk, you can easily:
15+
With ``webexpythonsdk``, you can easily:
1616

1717
* Interact with the Webex APIs in an interactive Python session
1818

@@ -30,6 +30,7 @@ The User Guide
3030
:maxdepth: 2
3131

3232
installation
33+
user/migrate
3334
user/intro
3435
user/quickstart
3536
user/api

docs/user/migrate.rst

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
.. _Migrate:
2+
3+
.. currentmodule:: webexpythonsdk
4+
5+
=========
6+
Migration
7+
=========
8+
9+
This *should* 🤞 be easy!
10+
11+
``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.
12+
13+
Major changes that you should be aware of:
14+
15+
* The package name has changed from ``webexteamssdk`` to ``webexpythonsdk``
16+
* ``webexpythonsdk`` drops support for Python v2, and supports Python 3.10+
17+
* The primary API object has changed from ``WebexTeamsAPI`` to ``WebexAPI``
18+
19+
20+
21+
---------------
22+
Migration Guide
23+
---------------
24+
25+
TL;DR: Update the package dependency, environment variables, imports, and primary API object.
26+
27+
The following table summarizes the name changes that need to be made to migrate from
28+
``webexteamssdk`` to ``webexpythonsdk``:
29+
30+
+------------------------------+------------------------+-----------------------------------+
31+
| Old Name | New Name | Description |
32+
+==============================+========================+===================================+
33+
| ``webexteamssdk`` | ``webexpythonsdk`` | Package name |
34+
+------------------------------+------------------------+-----------------------------------+
35+
| ``WebexTeamsAPI`` | ``WebexAPI`` | Primary API object |
36+
+------------------------------+------------------------+-----------------------------------+
37+
| ``WEBEX_TEAMS_ACCESS_TOKEN`` | ``WEBEX_ACCESS_TOKEN`` | Access token environment variable |
38+
+------------------------------+------------------------+-----------------------------------+
39+
40+
*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``.
41+
42+
**Doing a quick search-and-replace in your codebase should be all you need to do to migrate.**
43+
44+
Detailed Steps
45+
--------------
46+
47+
1. Update Package
48+
49+
Ensure you update the package in your project's dependencies:
50+
51+
.. code-block:: bash
52+
53+
pip uninstall webexteamssdk
54+
pip install webexpythonsdk
55+
56+
57+
2. Update Environment Variables
58+
59+
If you are using the ``WEBEX_TEAMS_ACCESS_TOKEN`` environment variable, you will need to update it to ``WEBEX_ACCESS_TOKEN``.
60+
61+
3. Codebase Changes
62+
63+
**Imports:** Replace all imports from ``webexteamssdk`` to ``webexpythonsdk``.
64+
65+
**Primary API Object:** Replace all instances of ``WebexTeamsAPI`` with ``WebexAPI``.
66+
67+
----------------
68+
For Contributors
69+
----------------
70+
71+
Project changes that you should be aware of:
72+
73+
- Tooling changes:
74+
- Using GitHub Actions for CI/CD
75+
- Using `poetry`_ for packaging and dependency management
76+
- Using `poetry-dynamic-versioning`_ for version management
77+
- Using `ruff`_ for linting and code formatting
78+
- Using `make`_ to automate common tasks
79+
- The test suite environment variable names have changed:
80+
81+
+-------------------------------------+-------------------------------+
82+
| Old Environment Variable | New Environment Variable |
83+
+=====================================+===============================+
84+
| ``WEBEX_TEAMS_ACCESS_TOKEN`` | ``WEBEX_ACCESS_TOKEN`` |
85+
+-------------------------------------+-------------------------------+
86+
| ``WEBEX_TEAMS_TEST_DOMAIN`` | ``WEBEX_TEST_DOMAIN`` |
87+
+-------------------------------------+-------------------------------+
88+
| ``WEBEX_TEAMS_TEST_ID_START`` | ``WEBEX_TEST_ID_START`` |
89+
+-------------------------------------+-------------------------------+
90+
| ``WEBEX_TEAMS_TEST_FILE_URL`` | ``WEBEX_TEST_FILE_URL`` |
91+
+-------------------------------------+-------------------------------+
92+
| ``WEBEX_TEAMS_GUEST_ISSUER_ID`` | ``WEBEX_GUEST_ISSUER_ID`` |
93+
+-------------------------------------+-------------------------------+
94+
| ``WEBEX_TEAMS_GUEST_ISSUER_SECRET`` | ``WEBEX_GUEST_ISSUER_SECRET`` |
95+
+-------------------------------------+-------------------------------+
96+
97+
98+
*Copyright (c) 2016-2024 Cisco and/or its affiliates.*
99+
100+
101+
.. _Webex: https://www.webex.com/products/teams/index.html
102+
.. _developer.webex.com: https://developer.webex.com/
103+
.. _issues: https://github.com/WebexCommunity/WebexPythonSDK/issues
104+
.. _poetry: https://python-poetry.org/
105+
.. _poetry-dynamic-versioning: https://github.com/mtkennerly/poetry-dynamic-versioning
106+
.. _ruff: https://docs.astral.sh/ruff/
107+
.. _make: https://www.gnu.org/software/make/

0 commit comments

Comments
 (0)