Skip to main content

Work with the Webex APIs in native Python!

Project description

Work with the Webex APIs in native Python!

License MIT PyPI Version webexpythonsdk PyPI Downloads webexteamssdk PyPI Downloads Tests Status Documentation Status

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


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!

from webexpythonsdk import WebexAPI

api = WebexAPI()

# Find all rooms that have 'webexpythonsdk Demo' in their title
all_rooms = api.rooms.list()
demo_rooms = [room for room in all_rooms if 'webexpythonsdk 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('webexpythonsdk Demo')

# Add people to the new demo room
email_addresses = ["test01@cmlccie.com", "test02@cmlccie.com"]
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/navigation/CiscoWebex-Logo_white.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!

Features

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 ==> WebexAPI “connection object”

    • API Calls ==> Hierarchically organized methods underneath the WebexAPI ‘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…

Installation

Installing and upgrading webexpythonsdk is easy:

Install via PIP

$ pip install webexpythonsdk

Upgrade to the latest version

$ pip install webexpythonsdk --upgrade

Documentation

Excellent documentation is now available at: https://webexcommunity.github.io/WebexPythonSDK

Check out the Quickstart to dive in and begin using webexpythonsdk.

Examples

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!

Release Notes

Please see the releases page for release notes on the incremental functionality and bug fixes incorporated into the published releases.

Questions, Support & Discussion

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 Webex Python SDK - Python Community Contributors Webex space to ask questions, join the discussion, and share your projects and creations.

Contribution

webexpythonsdk is a community development project. Feedback, thoughts, ideas, and code contributions are welcome! Please see the Contributing guide for more information.

History

The Webex Python SDK (webexpythonsdk) library started as Cisco Spark API (ciscosparkapi) which became Webex Teams SDK and then Webex Python SDK (webexpythonsdk). We updated the library’s name in alignment with Cisco’s re-brand of Cisco Spark to Webex and then again to align the name with the broader set of Webex APIs accessible via the SDK (meetings, recordings, etc.). The previous versions of the library are deprecated and no longer supported; however, their open-source codebase is still available in the release/v0/ciscosparkapi and release/v1/webexteamssdk branches in this repository.

  • webexpythonsdk (current) is compatible with Python v3.10+ and is the recommended library for new projects.

  • webexteamssdk (deprecated) is compatible with Python v2 and v3 (<= v3.10) and is still available for existing projects. Users are encouraged to migrate to webexpythonsdk.

  • ciscosparkapi (deprecated) is compatible with Python v2 and v3 (<= v3.6) and should no longer be used.

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webexpythonsdk-2.0.6.tar.gz (67.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webexpythonsdk-2.0.6-py3-none-any.whl (149.9 kB view details)

Uploaded Python 3

File details

Details for the file webexpythonsdk-2.0.6.tar.gz.

File metadata

  • Download URL: webexpythonsdk-2.0.6.tar.gz
  • Upload date:
  • Size: 67.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for webexpythonsdk-2.0.6.tar.gz
Algorithm Hash digest
SHA256 f28f5bfbc460208a7704f3adef3d79a4d0d6501ed60638d7ce7e83972346c4a2
MD5 c94b899289546d87c9794de7fb93b2ff
BLAKE2b-256 d5da460a2a74278487120e1338e59748a1714d49c08a8143420b218ef7ac8891

See more details on using hashes here.

Provenance

The following attestation bundles were made for webexpythonsdk-2.0.6.tar.gz:

Publisher: release.yml on WebexCommunity/WebexPythonSDK

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webexpythonsdk-2.0.6-py3-none-any.whl.

File metadata

  • Download URL: webexpythonsdk-2.0.6-py3-none-any.whl
  • Upload date:
  • Size: 149.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for webexpythonsdk-2.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1815db24c9b915278d9fb683b72e55e99f4bb3d9e63f3769b907c6fbf128cfb6
MD5 22d42918b20c142f912ea2a52735d3a5
BLAKE2b-256 1a0bd51e0cc89462eebace17d27d85c2f89f49b6140c35a549eb2683e90317b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for webexpythonsdk-2.0.6-py3-none-any.whl:

Publisher: release.yml on WebexCommunity/WebexPythonSDK

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page