Getting Started¶
Before you can use the SWAT package, you will need a running CAS server. The SWAT package can connect to either the binary port or the HTTP port. If you have the option of either, the binary protocol will give you better performance.
Other than the CAS host and port, you just need a user name and password to connect. User names and passwords can be implemented in various ways, so you may need to see your system administrator on how to acquire an account.
To connect to a CAS server, you simply import SWAT and use the swat.CAS class to create a connection.
In [1]: import swat
In [2]: conn = swat.CAS(host, port, userid, password)
Now that we have a connection to CAS, we can run some actions on it.
Running CAS Actions¶
To test your connection, you can run the serverstatus action.
In [3]: out = conn.serverstatus()
NOTE: Grid node action status report: 1 nodes, 6 total actions executed.
In [4]: out