Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Work with the Webex APIs in native Python!

License

NotificationsYou must be signed in to change notification settings

WebexCommunity/WebexPythonSDK

 
 

Repository files navigation

Simple, lightweight, scalable Python API wrapper for the Cisco Spark APIs

https://travis-ci.org/CiscoDevNet/ciscosparkapi.svg?branch=masterhttps://readthedocs.org/projects/ciscosparkapi/badge/?version=latest

ciscosparkapi is acommunity developed Pythonic wrapping of the CiscoSpark APIs, which makes working with Cisco Spark in Python anative andnatural experience!

fromciscosparkapiimportCiscoSparkAPIapi=CiscoSparkAPI()# Find all rooms that have 'ciscosparkapi Demo' in their titleall_rooms=api.rooms.list()demo_rooms= [roomforroominall_roomsif'ciscosparkapi Demo'inroom.title]# Delete all of the demo roomsforroomindemo_rooms:api.rooms.delete(room.id)# Create a new demo roomdemo_room=api.rooms.create('ciscosparkapi Demo')# Add people to the new demo roomemail_addresses= ["test01@cmlccie.com","test02@cmlccie.com"]foremailinemail_addresses:api.memberships.create(demo_room.id,personEmail=email)# Post a message to the new room, and upload a fileapi.messages.create(demo_room.id,text="Welcome to the room!",files=["https://developer.ciscospark.com/images/logo_spark_lg@256.png"])

That's more than 6 Spark API calls in less than 23 lines of code (with commentsand whitespace), and likely more than that since ciscosparkapi handlespagination for you automatically!

ciscosparkapi makes your life better...Learn how!

Features

ciscosparkapi does all of this for you...

  • Transparently sources your Spark credentials from your local environment
  • Provides and uses default arguments and settings everywhere possible, so youdon't have to think about things like API endpoint URLs, HTTP headers andJSON formats
  • Represents all Cisco Spark API interactions using native Python tools
    • Authentication and Connection to the Cisco Spark Cloud ==>CiscoSparkAPI 'Connection Object'
    • API Calls ==> Hierarchically organized method calls underneath aCiscoSparkAPI '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 muchmore...

Installation

Installing and upgrading ciscosparkapi is easy:

Install via PIP

$ pip install ciscosparkapi

Upgrading to the latest Version

$ pip install ciscosparkapi --upgrade

Documentation

Excellent documentation is now available at:http://ciscosparkapi.readthedocs.io

Check out theQuickstart to dive in and begin using ciscosparkapi.

Examples

Looking for some examples or sample scripts? Check out theexamples folder!

Have a good example script you would like to share? Please feel free tocontribute!

Release Notes

Complete and fully functionalBeta releases have been published. Pleasesee thereleases page for release notes on the incremental functionality andbug fixes incorporated into the published releases.

Note: The package APIs may change, while the package is in beta.

Questions, Support & Discussion

This is acommunity developed andcommunity supported project. If youexperience any issues using this package, please report them using theissues log.

Please join thePython Spark Devs community Spark room to ask questions,join the discussion and share your projects and creations.

Contribution

ciscosparkapi and it's sister projectciscosparksdk are communitydevelopment projects. Feedback, thoughts, ideas and code contributions aremost welcome!

Feedback, issues, thoughts and ideas...

Please use theissues log.

Interested in contributing code?

  1. Check for openissues or create a new 'issue' for the item you wantto work on.
    • Assign yourself to the issue, and communicate with any others that may beworking the issue.
  2. Review the projectcharter for coding standards and practices.
  3. Fork a copy ofthe repository.
  4. Add your code to your forked repository.
  5. Submit apull request.

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


[8]ページ先頭

©2009-2025 Movatter.jp