/ Programming

SakaiPy v2.0.0 is out!

Version 2.0.0 of my Sakai Python library, SakaiPy is now out on GitHub and PyPi.

I went with a version jump to v2 since there was a significant change in the library.

It used to only work on Python2.7x because it was dependent on the Mechanize library for session/cookie logging. I'm now using Sakai's /direct/session/ RESTful API system to generate a session cookie.

SakaiPy should work fully on Python 2.x (>2.5) & Python 3.x.

Quick Example

So it's even easier now to use SakaiPy since there's no more need for mechanize. You no longer have to enter in website scraping information, all you need is the base url for your Sakai installation and your username/password.

# -*- coding: utf-8 -*-
from SakaiPy import RequestGenerator
from SakaiPy.SakaiTools import Calendar

"""Say I want to get a list of all of the Calendars I have for a specific site. I'll write all the code first then explain each part."""



rq = RequestGenerator.RequestGenerator(authInfo)

Calendars= Calendar.Calendar(rq).getAllMyEvents()
print (Calendars)
SakaiPy v2.0.0 is out!
Share this

Subscribe to Wills Thoughts