Module H5L

Linkproxy objects

API for the “H5L” family of link-related operations. Defines the class LinkProxy, which comes attached to GroupID objects as <obj>.links.

class h5py.h5l.LinkProxy

Proxy class which provides access to the HDF5 “H5L” API.

These come attached to GroupID objects as “obj.links”. Since every H5L function operates on at least one group, the methods provided operate on their parent group identifier. For example:

>>> g = h5g.open(fid, '/')
>>> g.links.exists("MyGroup")
True
>>> g.links.exists("FooBar")
False
  • Hashable: No

  • Equality: Undefined

You will note that this class does not inherit from ObjectID.

create_external(STRING link_name, STRING file_name, STRING obj_name, PropLCID lcpl=None, PropLAID lapl=None)

Create a new external link, pointing to an object in another file.

create_hard(STRING new_name, GroupID cur_loc, STRING cur_name, PropID lcpl=None, PropID lapl=None)

Create a new hard link in this group pointing to an existing link in another group.

create_soft(STRING new_name, STRING target, PropID lcpl=None, PropID lapl=None)

Create a new soft link in this group, with the given string value. The link target does not need to exist.

exists(STRING name, PropID lapl=None) BOOL

Check if a link of the specified name exists in this group.

get_info(STRING name=, INT index=, **kwds) LinkInfo instance

Get information about a link, either by name or its index.

Keywords:

get_val(STRING name, PropLAID lapl=None) -> STRING or TUPLE(file, obj)

Get the string value of a soft link, or a 2-tuple representing the contents of an external link.

iterate(CALLABLE func, **kwds) <Return value from func>, <index to restart at>

Iterate a function or callable object over all groups in this one. Your callable should conform to the signature:

func(STRING name) => Result

or if the keyword argument “info” is True:

func(STRING name, LinkInfo info) => Result

Returning None or a logical False continues iteration; returning anything else aborts iteration and returns that value.

BOOL info (False)

Provide a LinkInfo instance to callback

STRING obj_name (“.”)

Visit this subgroup instead

PropLAID lapl (None)

Link access property list for “obj_name”

INT idx_type (h5.INDEX_NAME)

INT order (h5.ITER_INC)

hsize_t idx (0)

The index to start iterating at

move(STRING src_name, GroupID dst_loc, STRING dst_name)

Move a link to a new location in the file.

visit(CALLABLE func, **kwds) <Return value from func>

Iterate a function or callable object over all groups below this one. Your callable should conform to the signature:

func(STRING name) => Result

or if the keyword argument “info” is True:

func(STRING name, LinkInfo info) => Result

Returning None or a logical False continues iteration; returning anything else aborts iteration and returns that value.

BOOL info (False)

Provide a LinkInfo instance to callback

STRING obj_name (“.”)

Visit this subgroup instead

PropLAID lapl (None)

Link access property list for “obj_name”

INT idx_type (h5.INDEX_NAME)

INT order (h5.ITER_INC)

Module constants