How to use the h5pyd.Folder function in h5pyd

To help you get started, we’ve selected a few h5pyd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github HDFGroup / h5pyd / h5pyd / _apps / hsdel.py View on Github external
def getFolder(domain, mode='r'):
    username = cfg["hs_username"]
    password = cfg["hs_password"]
    endpoint = cfg["hs_endpoint"]
    bucket = cfg["hs_bucket"]
    dir = h5py.Folder(domain, mode=mode, endpoint=endpoint, username=username, password=password, bucket=bucket)
    return dir
github HDFGroup / h5pyd / h5pyd / _apps / hsmv.py View on Github external
def getFolder(domain, mode="r"):
    username = cfg["hs_username"]
    password = cfg["hs_password"]
    endpoint = cfg["hs_endpoint"]
    bucket = cfg["hs_bucket"]
    dir = h5pyd.Folder(domain, endpoint=endpoint, username=username,
                      password=password, bucket=bucket, mode=mode)
    return dir
github HDFGroup / h5pyd / apps / hsdel.py View on Github external
def getFolder(domain, mode='r'):
    username = cfg["hs_username"]
    password = cfg["hs_password"]
    endpoint = cfg["hs_endpoint"]
    dir = h5py.Folder(domain, mode=mode, endpoint=endpoint, username=username, password=password)
    return dir
github HDFGroup / h5pyd / h5pyd / _apps / hstouch.py View on Github external
def getFolder(domain):
    username = cfg["hs_username"]
    password = cfg["hs_password"]
    endpoint = cfg["hs_endpoint"]
    bucket = cfg["hs_bucket"]
    #print("getFolder", domain)
    dir = h5py.Folder(domain, endpoint=endpoint, username=username, password=password, bucket=bucket)
    return dir
github HDFGroup / h5pyd / h5pyd / _apps / hsls.py View on Github external
def getFolder(domain):
    username = cfg["hs_username"]
    password = cfg["hs_password"]
    endpoint = cfg["hs_endpoint"]
    bucket   = cfg["hs_bucket"]
    pattern = cfg["pattern"]
    query = cfg["query"]
    batch_size = 100  # use smaller batchsize for interactively listing of large collections
    dir = h5py.Folder(domain, endpoint=endpoint, username=username,
                      password=password, bucket=bucket, pattern=pattern, query=query, batch_size=batch_size)
    return dir
github HDFGroup / h5pyd / h5pyd / _apps / hsinfo.py View on Github external
def getHomeFolder():
    username = cfg["hs_username"]
    password = cfg["hs_password"]
    endpoint = cfg["hs_endpoint"]
    if not username:
        return None
    dir = h5pyd.Folder('/home/', username=username, password=password, endpoint=endpoint)  # get folder object for root
    homefolder = None
    for name in dir:
        # we should come across the given domain
        if username.startswith(name):
            # check any folders where the name matches at least part of the username
            # e.g. folder: "/home/bob/" for username "bob@acme.com"
            path = '/home/' + name + '/'
            try:
                f = h5pyd.Folder(path, username=username, password=password, endpoint=endpoint)
            except IOError as ioe:
                # print("got ioe:", ioe)
                continue
            except Exception as e:
                 # print("got exception:", e)
                continue
            if f.owner == username:
github HDFGroup / h5pyd / h5pyd / _apps / hsinfo.py View on Github external
def getHomeFolder():
    username = cfg["hs_username"]
    password = cfg["hs_password"]
    endpoint = cfg["hs_endpoint"]
    if not username:
        return None
    dir = h5pyd.Folder('/home/', username=username, password=password, endpoint=endpoint)  # get folder object for root
    homefolder = None
    for name in dir:
        # we should come across the given domain
        if username.startswith(name):
            # check any folders where the name matches at least part of the username
            # e.g. folder: "/home/bob/" for username "bob@acme.com"
            path = '/home/' + name + '/'
            try:
                f = h5pyd.Folder(path, username=username, password=password, endpoint=endpoint)
            except IOError as ioe:
                # print("got ioe:", ioe)
                continue
            except Exception as e:
                 # print("got exception:", e)
                continue
            if f.owner == username:
                homefolder = path
            f.close()
            if homefolder:
                break

    dir.close()
    return homefolder
#