Mercurial > repos > eric-rasche > apollo
view list_organisms.py @ 4:23ead6905145 draft
planemo upload for repository https://github.com/TAMU-CPT/galaxy-webapollo commit 4ac38d0b6dba1183f3e78eb5c224c7051064b4a5-dirty
author | eric-rasche |
---|---|
date | Thu, 12 Jan 2017 11:53:44 -0500 |
parents | d4ae83dedb14 |
children | 7610987e0c48 |
line wrap: on
line source
#!/usr/bin/env python import json import argparse from webapollo import WAAuth, WebApolloInstance, AssertUser, accessible_organisms if __name__ == '__main__': parser = argparse.ArgumentParser(description='Sample script to add an attribute to a feature via web services') WAAuth(parser) parser.add_argument('email', help='User Email') args = parser.parse_args() wa = WebApolloInstance(args.apollo, args.username, args.password) gx_user = AssertUser(wa.users.loadUsers(email=args.email)) all_orgs = wa.organisms.findAllOrganisms() orgs = accessible_organisms(gx_user, all_orgs) print json.dumps(orgs, indent=2)