opc.uri module#

class opc.uri.Uri(uri_str)[source]#

Class for uri of the Part in a Package.

Parameters:

uri_str – string value of the part’s uri

get_abs(rel_target_uri_str)[source]#

Method to get the absolute uri from the relative uri

Parameters:

rel_target_uri_str – relative uri with respect to current uri

Returns:

absolute uri string value

get_rel(abs_target_uri_str)[source]#

Returns the relative uri str value from the given absolute uri str of the target part. Relative with respect to the current uri

Parameters:

abs_target_uri_str – absolute uri str of target part

Returns:

str value of the relative uri

static zipname2str(zipname)[source]#

static method.

Parameters:

zipname – string value of the any zipname

Returns:

uri string value from the given zipname

property ext#

Readonly property. :returns: string extension value of the uri

property is_rels#

Readonly property. :returns: boolean if the uri is of a rels part or not

property rels#

Readonly property. :returns: the uri string of the RelsPart of current uri’s part

property str#

Readonly property. :returns: the string value of the uri

property zipname#

Readonly property. :returns: the zipname of the uri i.e. name valid for zipfile