コード例 #1
0
ファイル: cli.py プロジェクト: salamb/girder
    def __init__(self,
                 username,
                 password,
                 dryrun,
                 blacklist,
                 host=None,
                 port=None,
                 apiRoot=None,
                 scheme=None,
                 apiUrl=None,
                 apiKey=None):
        """initialization function to create a GirderCli instance, will attempt
        to authenticate with the designated Girder instance. Aside from username
        and password, all other kwargs are passed directly through to the
        :py:class:`girder_client.GirderClient` base class constructor.

        :param username: username to authenticate to Girder instance.
        :param password: password to authenticate to Girder instance, leave
            this blank to be prompted.
        """
        GirderClient.__init__(self,
                              host=host,
                              port=port,
                              apiRoot=apiRoot,
                              scheme=scheme,
                              dryrun=dryrun,
                              blacklist=blacklist,
                              apiUrl=apiUrl)
        interactive = password is None

        if apiKey:
            self.authenticate(apiKey=apiKey)
        elif username:
            self.authenticate(username, password, interactive=interactive)
コード例 #2
0
 def __init__(self, apiKey, objectStore):
     """initialization function to create a GirderCli instance, will attempt
     to authenticate with the designated Girder instance.
     """
     GirderClient.__init__(self, apiUrl="https://data.kitware.com/api/v1")
     self.objectStore = objectStore
     self.authenticate(apiKey=apiKey)
コード例 #3
0
 def __init__(self, apiKey, objectStore):
     """initialization function to create a GirderCli instance, will attempt
     to authenticate with the designated Girder instance.
     """
     GirderClient.__init__(self, apiUrl="https://data.kitware.com/api/v1")
     self.objectStore = objectStore
     self.authenticate(apiKey=apiKey)
コード例 #4
0
ファイル: cli.py プロジェクト: chrismattmann/girder
 def __init__(self,
              username,
              password,
              dryrun,
              blacklist,
              host=None,
              port=None,
              apiRoot=None,
              scheme=None):
     """initialization function to create a GirderCli instance, will attempt
     to authenticate with the designated Girder instance.
     :param username: username to authenticate to Girder instance.
     :param password: password to authenticate to Girder instance, leave
         this blank to be prompted.
     :param dryrun: boolean indicating whether to run the command or just
         perform a dryrun showing which files and folders will be uploaded.
     :param blacklist: list of filenames which will be ignored by upload.
     :param host: host used to connect to Girder instance,
         defaults to 'localhost'
     :param port: port used to connect to Girder instance,
         default is 80 for http: and 443 for https:
     :param apiRoot: The path on the server corresponding to the root of the
         Girder REST API. If None is passed, assumes '/api/v1'.
     :param scheme: scheme used to connect to Girder instance,
         defaults to 'http'
     """
     GirderClient.__init__(self,
                           host=host,
                           port=port,
                           apiRoot=apiRoot,
                           scheme=scheme,
                           dryrun=dryrun,
                           blacklist=blacklist)
     interactive = password is None
     self.authenticate(username, password, interactive=interactive)
コード例 #5
0
ファイル: cli.py プロジェクト: anukat2015/girder
    def __init__(self, username, password, dryrun, blacklist,
                 host=None, port=None, apiRoot=None, scheme=None, apiUrl=None):
        """initialization function to create a GirderCli instance, will attempt
        to authenticate with the designated Girder instance. Aside from username
        and password, all other kwargs are passed directly through to the
        :py:class:`girder_client.GirderClient` base class constructor.

        :param username: username to authenticate to Girder instance.
        :param password: password to authenticate to Girder instance, leave
            this blank to be prompted.
        """
        GirderClient.__init__(self, host=host, port=port,
                              apiRoot=apiRoot, scheme=scheme, dryrun=dryrun,
                              blacklist=blacklist, apiUrl=apiUrl)
        interactive = password is None
        self.authenticate(username, password, interactive=interactive)
コード例 #6
0
ファイル: cli.py プロジェクト: manthey/girder
 def __init__(self, username, password, dryrun, blacklist, host="localhost", port=8080, apiRoot=None, scheme="http"):
     """initialization function to create a GirderCli instance, will attempt
     to authenticate with the designated Girder instance.
     :param username: username to authenticate to Girder instance.
     :param password: password to authenticate to Girder instance, leave
         this blank to be prompted.
     :param dryrun: boolean indicating whether to run the command or just
         perform a dryrun showing which files and folders will be uploaded.
     :param blacklist: list of filenames which will be ignored by upload.
     :param host: host used to connect to Girder instance,
         defaults to 'localhost'
     :param port: port used to connect to Girder instance,
         defaults to 8080
     :param apiRoot: The path on the server corresponding to the root of the
         Girder REST API. If None is passed, assumes '/api/v1'.
     :param scheme: scheme used to connect to Girder instance,
         defaults to 'http'; if passing 'https' port should likely be 443.
     """
     GirderClient.__init__(
         self, host=host, port=port, apiRoot=apiRoot, scheme=scheme, dryrun=dryrun, blacklist=blacklist
     )
     interactive = password is None
     self.authenticate(username, password, interactive=interactive)