icat.cgi — Common Gateway Interface support

This module provides tools for writing CGI scripts acting as ICAT clients.

Deprecated since version 0.13: This module is deprecated and will be removed in version 1.0.

class icat.cgi.SessionCookie

Bases: http.cookies.SimpleCookie

A cookie to store an ICAT session id.

Extend the parent class by the attribute sessionId. Setting this attribute will set the session id in the cookie, getting it will retrieve its value from the cookie.

class icat.cgi.Session(url, cookieName='ICATSESSIONID', cookiePath='/', secure=True)

Bases: object

A persisting ICAT session.

Manage an ICAT session that persist over the life time of the script. The session id is stored in a icat.cgi.SessionCookie.

isActive()

Check whether there is an active session.

login(auth, username, password)

Log in with username and password and start a session.

logout()

Log out and terminate the session.