Package: ciscosparkapi
Simple, lightweight, scalable Python API wrapper for the Cisco Spark APIsciscosparkapiis acommunity developedPythonic wrapping of the Cisco
Spark APIs, which makes working with Cisco Spark in Python anativeandnaturalexperience!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 comments
and whitespace), and likely more than that since ciscosparkapi handlespaginationfor you automatically!ciscosparkapi makes your life better…Learn how!Featuresciscosparkapi does all of this for you…Transparently sources your Spark credentials from your local environmentProvides 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 formatsRepresents all Cisco Spark API interactions using native Python toolsAuthentication 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 objectsAutomatic and transparent pagination!Automatic rate-limit handling!(wait|retry)Multipart encoding and uploading of local filesAuto-completion in your favorite IDE, descriptive exceptions, and so much
more…InstallationInstalling and upgrading ciscosparkapi is easy:Install via PIP$pipinstallciscosparkapiUpgrading to the latest Version$pipinstallciscosparkapi--upgradeDocumentationExcellent documentation is now available at:http://ciscosparkapi.readthedocs.ioCheck out theQuickstartto dive in and begin using ciscosparkapi.ExamplesLooking for some examples or sample scripts?  Check out theexamplesfolder!Have a good example script you would like to share?  Please feel free tocontribute!Release NotesComplete and fully functionalBetareleases have been published.  Please
see thereleasespage for release notes on the incremental functionality and
bug fixes incorporated into the published releases.Note:The package APIs may change, while the package is in beta.Questions, Support & DiscussionThis is acommunity developedandcommunity supportedproject.  If you
experience any issues using this package, please report them using theissueslog.Please join thePython Spark Devscommunity Spark room to ask questions,
join the discussion and share your projects and creations.Contributionciscosparkapiand it’s sister projectciscosparksdkare community
development projects.  Feedback, thoughts, ideas and code contributions are
most welcome!Feedback, issues, thoughts and ideas…Please use theissueslog.Interested in contributing code?Check for openissuesor create a new ‘issue’ for the item you want
to work on.Assign yourself to the issue, and communicate with any others that may be
working the issue.Review the projectcharterfor coding standards and practices.Fork a copy ofthe repository.Add your code to your forked repository.Submit apull request.Copyright (c) 2016-2018 Cisco and/or its affiliates.