============= WebexPythonSDK =============
Work with the Webex APIs in native Python!
.. image:: https://img.shields.io/badge/license-MIT-blue.svg :target: https://github.com/CiscoDevNet/webexteamssdk/blob/master/LICENSE .. image:: https://img.shields.io/pypi/v/webexteamssdk.svg :target: https://pypi.org/project/webexteamssdk/ .. image:: https://img.shields.io/pypi/dw/webexteamssdk.svg :target: https://pypi.org/project/webexteamssdk/ .. image:: https://travis-ci.org/CiscoDevNet/webexteamssdk.svg?branch=master :target: https://travis-ci.org/CiscoDevNet/webexteamssdk .. image:: https://readthedocs.org/projects/webexteamssdk/badge/?version=latest :target: http://webexteamssdk.readthedocs.io/en/latest/?badge=latest
With release v1.6 we are wrapping up active development on the v1.x release and shifting our focus to the next major
release v2! Please see the work-in-progress Release Plan
and contribute your ideas for v2.x enhancements by either
opening enhancement issues or by joining our
webexteamssdk - Webex Teams SDK - Python Community Contributors <https://eurl.io/#BJ0A8gfOQ>
_ space and posting your
ideas there.
WebexPythonSDK is a community developed Python library for working with the Webex APIs. Our goal is to make working with Webex in Python a native and natural experience!
.. code-block:: Python
from webexteamssdk import WebexTeamsAPI
api = WebexTeamsAPI()
# Find all rooms that have 'webexteamssdk Demo' in their title
all_rooms = api.rooms.list()
demo_rooms = [room for room in all_rooms if 'webexteamssdk Demo' in room.title]
# Delete all of the demo rooms
for room in demo_rooms:
api.rooms.delete(room.id)
# Create a new demo room
demo_room = api.rooms.create('webexteamssdk Demo')
# Add people to the new demo room
email_addresses = ["[email protected]", "[email protected]"]
for email in email_addresses:
api.memberships.create(demo_room.id, personEmail=email)
# Post a message to the new room, and upload a file
api.messages.create(demo_room.id, text="Welcome to the room!",
files=["https://www.webex.com/content/dam/wbx/us/images/dg-integ/teams_icon.png"])
That's more than 6 Webex API calls in less than 23 lines of code (with comments and whitespace), and likely more than that, since WebexPythonSDK handles pagination_ for you automatically!
WebexPythonSDK makes your life better... Learn how!
__
__ Introduction_
WebexPythonSDK does all of this for you:
Transparently sources your Webex access token from your local environment
Provides and uses default arguments and settings everywhere possible, so you don't have to think about things like API endpoint URLs, HTTP headers and JSON formats
Represents all Webex API interactions using native Python tools
Authentication and Connection to the Webex Cloud ==> WebexTeamsAPI "connection object"
API Calls ==> Hierarchically organized methods underneath the WebexTeamsAPI 'Connection Object'
Returned Data Objects ==> Native Python objects
Automatic and transparent pagination!
Automatic rate-limit handling! (wait|retry)
Multipart encoding and uploading of local files
Auto-completion in your favorite IDE, descriptive exceptions, and so much more...
Installing and upgrading webexteamssdk is easy:
Install via PIP
.. code-block:: bash
$ pip install webexteamssdk
Upgrade to the latest version
.. code-block:: bash
$ pip install webexteamssdk --upgrade
Excellent documentation is now available at: http://webexteamssdk.readthedocs.io
Check out the Quickstart_ to dive in and begin using webexteamssdk.
Are you looking for some sample scripts? Check out the examples_ folder!
Have a good example script you would like to share? Please feel free to contribute
__!
__ Contribution_
Please see the releases_ page for release notes on the incremental functionality and bug fixes incorporated into the published releases.
WebexPythonSDK is a community developed and community-supported project. If you experience any issues using this package, please report them using the issues_ page.
Please join the Python Webex Teams Devs
__ Webex space to ask questions, join the discussion, and share your
projects and creations.
__ Community_
WebexPythonSDK is a community development project. Feedback, thoughts, ideas, and code contributions are welcome!
Please see the Contributing
_ guide for more information.
The Webex Python SDK (webexteamssdk) library started as Cisco Spark API (ciscosparkapi). We updated the library's name in
alignment with Cisco's re-brand of Cisco Spark to Webex. The Cisco Spark API library has been deprecated and is no
longer supported; however, its open-source codebase is still available in the ciscosparkapi
_ branch of this
repository.
The development team may make additional name changes as the library evolves with the Webex APIs published on developer.webex.com.
Copyright (c) 2016-2020 Cisco and/or its affiliates.
.. Release Plan: https://github.com/CiscoDevNet/webexteamssdk/wiki/Release-Plans
.. _Introduction: http://webexteamssdk.readthedocs.io/en/latest/user/intro.html
.. _pagination: https://developer.webex.com/docs/basics#pagination
.. _webexteamssdk.readthedocs.io: https://webexteamssdk.readthedocs.io
.. _Quickstart: http://webexteamssdk.readthedocs.io/en/latest/user/quickstart.html
.. _examples: https://github.com/CiscoDevNet/webexteamssdk/tree/master/examples
.. _webexteamssdk: https://github.com/CiscoDevNet/webexteamssdk
.. _issues: https://github.com/CiscoDevNet/webexteamssdk/issues
.. _Community: https://eurl.io/#HkMxO-_9-
.. _projects: https://github.com/CiscoDevNet/webexteamssdk/projects
.. _pull requests: https://github.com/CiscoDevNet/webexteamssdk/pulls
.. _releases: https://github.com/CiscoDevNet/webexteamssdk/releases
.. _the repository: webexteamssdk
.. pull request: pull requests
.. _Contributing: https://github.com/CiscoDevNet/webexteamssdk/blob/master/docs/contributing.rst
.. _ciscosparkapi: https://github.com/CiscoDevNet/ciscosparkapi/tree/ciscosparkapi
Bumps ipython from 7.16.1 to 8.10.0.
Sourced from ipython's releases.
See https://pypi.org/project/ipython/
We do not use GitHub release anymore. Please see PyPI https://pypi.org/project/ipython/
15ea1ed
release 8.10.0560ad10
DOC: Update what's new for 8.10 (#13939)7557ade
DOC: Update what's new for 8.10385d693
Merge pull request from GHSA-29gw-9793-fvw7e548ee2
Swallow potential exceptions from showtraceback() (#13934)0694b08
MAINT: mock slowest test. (#13885)8655912
MAINT: mock slowest test.a011765
Isolate the attack tests with setUp and tearDown methodsc7a9470
Add some regression tests for this changefd34cf5
Swallow potential exceptions from showtraceback()Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps cryptography from 3.4.7 to 39.0.1.
Sourced from cryptography's changelog.
39.0.1 - 2023-02-07
* **SECURITY ISSUE** - Fixed a bug where ``Cipher.update_into`` accepted Python buffer protocol objects, but allowed immutable buffers. **CVE-2023-23931** * Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 3.0.8.
.. _v39-0-0:
39.0.0 - 2023-01-01
- BACKWARDS INCOMPATIBLE: Support for OpenSSL 1.1.0 has been removed. Users on older version of OpenSSL will need to upgrade.
- BACKWARDS INCOMPATIBLE: Dropped support for LibreSSL < 3.5. The new minimum LibreSSL version is 3.5.0. Going forward our policy is to support versions of LibreSSL that are available in versions of OpenBSD that are still receiving security support.
- BACKWARDS INCOMPATIBLE: Removed the
encode_point
andfrom_encoded_point
methods on :class:~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicNumbers
, which had been deprecated for several years. :meth:~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey.public_bytes
and :meth:~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey.from_encoded_point
should be used instead.- BACKWARDS INCOMPATIBLE: Support for using MD5 or SHA1 in :class:
~cryptography.x509.CertificateBuilder
, other X.509 builders, and PKCS7 has been removed.- BACKWARDS INCOMPATIBLE: Dropped support for macOS 10.10 and 10.11, macOS users must upgrade to 10.12 or newer.
- ANNOUNCEMENT: The next version of
cryptography
(40.0) will change the way we link OpenSSL. This will only impact users who buildcryptography
from source (i.e., not from awheel
), and specify their own version of OpenSSL. For those users, theCFLAGS
,LDFLAGS
,INCLUDE
,LIB
, andCRYPTOGRAPHY_SUPPRESS_LINK_FLAGS
environment variables will no longer be respected. Instead, users will need to configure their buildsas documented here
_.- Added support for :ref:
disabling the legacy provider in OpenSSL 3.0.x<legacy-provider>
.- Added support for disabling RSA key validation checks when loading RSA keys via :func:
~cryptography.hazmat.primitives.serialization.load_pem_private_key
, :func:~cryptography.hazmat.primitives.serialization.load_der_private_key
, and :meth:~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers.private_key
. This speeds up key loading but is :term:unsafe
if you are loading potentially attacker supplied keys.- Significantly improved performance for :class:
~cryptography.hazmat.primitives.ciphers.aead.ChaCha20Poly1305
... (truncated)
d6951dc
changelog + security fix backport (#8231)138da90
workaround scapy bug in downstream tests (#8218) (#8228)69527bc
bookworm is py311 now (#8200)111deef
backport main branch CI to 39.0.x (#8153)338a65a
39.0.0 version bump (#7954)84a3cd7
automatically download and upload circleci wheels (#7949)525c0b3
Type annotate release.py (#7951)46d2a94
Use the latest 3.10 release when wheel building (#7953)f150dc1
fix CI to work with ubuntu 22.04 (#7950)8867724
fix README for python3 (#7947)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
When trying to import WebexTeamsAPI from webexteamssdk in python3.11 it raises an exception:
from webexteamssdk import WebexTeamsAPI
File "/venv/lib/python3.11/site-packages/webexteamssdk/__init__.py", line 40, in <module>
from .api import WebexTeamsAPI
File "/venv/lib/python3.11/site-packages/webexteamssdk/api/__init__.py", line 25, in <module>
from past.types import basestring
File "/venv/lib/python3.11/site-packages/past/types/__init__.py", line 25, in <module>
from .oldstr import oldstr
File "/venv/lib/python3.11/site-packages/past/types/oldstr.py", line 5, in <module>
from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.11/collections/__init__.py)
versioneer.py attempts to use configparser.SafeConfigParser
which has been deprecated for a long time, and now removed in Python 3.12, causing build to fail.
Upgrading versioneer to a newer version would seem likely to fix this: https://github.com/python-versioneer/python-versioneer/issues/200
This PR is in reference to #184 that was recently merged. The PR included broken links in the docs section that this PR fixes.
Changes:
This release is a hotfix that merges Pull request #175 into the main branch.
update
by @mallamanis in https://github.com/CiscoDevNet/webexteamssdk/pull/150Full Changelog: https://github.com/CiscoDevNet/webexteamssdk/compare/v1.6...v1.6.1
In v1.6, we have updated all of the currently wrapped and supported Webex Teams API endpoints and closed out all existing issues that users opened on the v1.x releases. The library should now be up-to-date in supporting the Webex Teams APIs documented at developer.webex.com. It is not yet up-to-date in supporting the newer and broader Webex Meetings, Calling, and Devices APIs. We are tracking adding these additional API endpoints in issue #113, and we will work to add full support for all of the published Webex APIs in v2.x of the library.
With release v1.6, we are wrapping up active development on the v1.x release and shifting our focus to the next major release v2!
We have introduced one (1) breaking change in v1.6:
We have changed the function signature (parameter names) for the WebexTeamsAPI.guest_issuer.create()
method to align it with the developer documentation at developer.webex.com.
Previous method definition:
python
def create(self, subject, displayName, issuerToken, expiration, secret):
...
python
def create(self, sub, name, iss, exp, secret):
...
Version 1.5 adds several minor backend improvements, including:
Webex Tracking IDs are now prominently displayed for all API errors and warnings.
Example Error Message: ``` ApiError: [401] Unauthorized - The request requires a valid access token set in the Authorization request header. [Tracking ID: ROUTER_5F05F384-D9E9-01BB-00FF-4B0C804F00FF] ````
You can also access the Tracking IDs via the tracking_id
attribute available on the raised exception and warning objects.
``` python api = webexteamssdk.WebexTeamsAPI(access_token="abc")
try: api.people.me() except webexteamssdk.ApiError as e: print(e.tracking_id) ``` * The webexteamssdk library now sends a custom User-Agent header (inspired by PIP's User-Agent header).
Example User-Agent Header:
webexteamssdk/1.5 {"implementation": {"name": "CPython", "version": "3.7.8"}, "distro": {"name": "macOS", "version": "10.15.5"}, "system": {"name": "Darwin", "release": "19.5.0"}, "cpu": "x86_64"}
Minor package and PEP8 improvements.
Version 1.4 adds support for the Admin Audit Events API; however, you should note that pagination is currently broken âšī¸ on responses from the /v1/adminAudit/events
API endpoint. Hopefully, the Developer Support Team will get this fixed quickly.
This minor update adds official support for adding attachments to messages via WebexTeamsAPI.messages.create()
thanks to @bradh11, @jianchen2580, @zhanto97, and @jwa1 đ!
@jpjpjp has created an excellent Webex Teams bot example that demonstrates using webhooks, Adaptive Cards, and response actions! đ
This release includes a beta of @sQu4rks Python Adaptive Cards, but please do not get too attached using this functionality directly from the Webex Teams SDK as we will be migrating this functionality to leverage @sQu4rks newer (and independently maintained) pyadaptivecards library.
Thanks to @sQu4rks đ, webexteamssdk
now (offically) supports configuration and use of an HTTP/HTTPS proxy! Just past a dictionary with the proxy configuration when creating your WebexTeamsAPI
connection object, and you are good to go. đ
```python
from webexteamssdk import WebexTeamsAPI proxy = {'https': 'http://
: '} api = WebexTeamsAPI(access_token= , proxies=proxy) ```
Check out the requests documentation on Proxies for details on what should be in the proxies dictionary.
An organization for the Webex Developer Community supported projects
GitHub Repository Homepagecisco webex webex-teams webex-teams-sdk python python2 python3 python-library python-sdk python-wrapper webex-teams-bot cisco-spark-bot