Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from pyopencga.rest_clients._parent_rest_clients import _ParentBasicCRUDClient
class Projects(_ParentBasicCRUDClient):
"""
This class contains method for Projects webservices
"""
def __init__(self, configuration, session_id=None, login_handler=None, *args, **kwargs):
_category = "projects"
super(Projects, self).__init__(configuration, _category, session_id, login_handler, *args, **kwargs)
def aggregation_stats(self, project, **options):
"""
Fetch catalog project stats
URL: /{apiVersion}/projects/{projects}/aggregationStats
:param project: project id
:param default: calculate default stats (bool)
import getpass
from pyopencga.rest_clients._parent_rest_clients import _ParentBasicCRUDClient
class Users(_ParentBasicCRUDClient):
"""
This class contains method for the Users webservices
"""
def __init__(self, configuration, session_id=None, login_handler=None, *args, **kwargs):
_category = 'users'
super(Users, self).__init__(configuration, _category, session_id, login_handler, *args, **kwargs)
def login(self, user, pwd=None, **options):
"""
This is the method for login
URL: /{apiVersion}/users/{user}/login
:param user: user id
:param pwd: user password