Skip to main content

Flexible http client for reading UW Groups API v3.

Project description

uwgs Build Status

Python3 Client Library for UW Groups API v3


At the moment, this library provides read-only functionality for:

import uwgs
from collections import namedtuple
import os
import json

Config = namedtuple('Config', ['client_cert', 'client_key', 'url'])

def load_config():
    cwd = os.path.dirname(os.path.abspath(__file__))
    fp = os.path.join(cwd, 'uwgs.json')
    with open(fp, 'r') as f:
        data = json.load(f)
        cfg = Config(data['client_cert'], data['client_key'], data['url'])
        return cfg

def cli():
    cfg = load_config()
    client = uwgs.Client(cfg.client_cert, cfg.client_key, cfg.url)

    payload ='<group_prefix>*')
    if payload.ok:
        groups = [group['id'] for group in['data']]
        rosters = client.get_memberships(groups)

if __name__ == "__main__":

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for uwgs, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size uwgs-0.2.0-py3-none-any.whl (5.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size uwgs-0.2.0.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page