prov package¶
Subpackages¶
Submodules¶
prov.constants module¶
prov.dot module¶
prov.graph module¶
prov.identifier module¶
-
class
prov.identifier.
Identifier
(uri)[source]¶ Bases:
object
Base class for all identifiers and also represents xsd:anyURI.
-
uri
¶ Identifier’s URI.
-
-
class
prov.identifier.
Namespace
(prefix, uri)[source]¶ Bases:
object
PROV Namespace.
-
contains
(identifier)[source]¶ Indicates whether the identifier provided is contained in this namespace.
Parameters: identifier – Identifier to check. Returns: bool
-
prefix
¶ Namespace prefix.
-
qname
(identifier)[source]¶ Returns the qualified name of the identifier given using the namespace prefix.
Parameters: identifier – Identifier to resolve to a qualified name. Returns: QualifiedName
-
uri
¶ Namespace URI.
-
-
class
prov.identifier.
QualifiedName
(namespace, localpart)[source]¶ Bases:
prov.identifier.Identifier
Qualified name of an identifier in a particular namespace.
-
localpart
¶ Local part of qualified name.
-
namespace
¶ Namespace of qualified name.
-
prov.model module¶
Module contents¶
-
exception
prov.
Error
[source]¶ Bases:
exceptions.Exception
Base class for all errors in this package.
-
prov.
read
(source, format=None)[source]¶ Convenience function returning a ProvDocument instance.
It does a lazy format detection by simply using try/except for all known formats. The deserializers should fail fairly early when data of the wrong type is passed to them thus the try/except is likely cheap. One could of course also do some more advanced format auto-detection but I am not sure that is necessary.
The downside is that no proper error messages will be produced, use the format parameter to get the actual traceback.