README.rst 993 Bytes
Newer Older
jens.kleineheismann's avatar
jens.kleineheismann committed
1 2 3 4 5 6 7
ABOUT
=====
This package provide a python binding to the KIT Gruppenverwaltung REST API.


INSTALLATION
============
8 9
``$ python setup.py develop``

jens.kleineheismann's avatar
jens.kleineheismann committed
10
or
11 12 13

``$ pip install -e .``

jens.kleineheismann's avatar
jens.kleineheismann committed
14 15 16 17 18
or any other method, you use to install your python packages.


USAGE
=====
19
::
jens.kleineheismann's avatar
jens.kleineheismann committed
20

21 22 23 24
 import kitgvapi
 
 gv = kitgvapi.ObjectInterface()
 gv.config.auth('myusername', 'mypassword')
25 26
 
 iism = gv.getOe('IISM')
27 28
 for g in iism.get_groups():
     print g.name
29
 iism.create_group('IISM-EM-newgroup', 'Neue Gruppe')
jens.kleineheismann's avatar
jens.kleineheismann committed
30

31
 staff = gv.getGroup('IISM-EM-OU-Staff')
32
 for u in staff.get_users(effective=True):
33
     print "{fn} {ln} ({un})".format(fn=u.firstname, ln=u.lastname, un=u.samaccount)
34
 for g in staff.get_groups():
35
     print "{gn} ({desc})".format(gn=g.name, desc=g.description)
36

37
 me = gv.getUser('zy8373')
38
 others = me.oe.get_users()
jens.kleineheismann's avatar
jens.kleineheismann committed
39 40 41 42 43


LICENCE
=======
Author: Jens Kleineheismann <kleineheismann@kit.edu>
44

jens.kleineheismann's avatar
jens.kleineheismann committed
45 46
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted.