Interface developer API reference#
When developing a QIIME 2 interface, you will use APIs defined in the qiime2.sdk
submodule.
Interface development API#
The PluginManager
Object#
Inputs and outputs#
- qiime2.sdk.Result()[source]#
Base class for QIIME 2 result classes (Artifact and Visualization).
This class is not intended to be instantiated. Instead, it acts as a public factory and namespace for interacting with Artifacts and Visualizations in a generic way. It also acts as a base class for code reuse and provides an API shared by Artifact and Visualization.
- qiime2.sdk.Results(fields, values)[source]#
Tuple class representing the named results of an
Action
.Provides an interface similar to a
namedtuple
type (e.g. fields are accessible as attributes).Users should not need to instantiate this class directly.
- qiime2.sdk.Artifact()[source]#
Base class for QIIME 2 result classes (Artifact and Visualization).
This class is not intended to be instantiated. Instead, it acts as a public factory and namespace for interacting with Artifacts and Visualizations in a generic way. It also acts as a base class for code reuse and provides an API shared by Artifact and Visualization.
- qiime2.sdk.Visualization()[source]#
Base class for QIIME 2 result classes (Artifact and Visualization).
This class is not intended to be instantiated. Instead, it acts as a public factory and namespace for interacting with Artifacts and Visualizations in a generic way. It also acts as a base class for code reuse and provides an API shared by Artifact and Visualization.
Actions#
Utility functions#
- qiime2.sdk.parse_type(string, expect=None)[source]#
Convert a string into a type expression
- Parameters:
string (str) – The string type expression to convert into a TypeExpression
expect ({'semantic', 'primitive', 'visualization'}, optional) – Will raise a TypeError if the resulting TypeExpression is not a member of expect.
- Return type:
type expression
- qiime2.sdk.type_from_ast(ast, scope=None)[source]#
Convert a type ast (from .to_ast()) to a type expression.
- Parameters:
ast (json compatible object) – The abstract syntax tree produced by to_ast on a type.
scope (dict) – A dictionary to use between multiple calls to share scope between different types. This allows type variables from the same type map to be constructed from an equivalent type map. Scope should be shared within a given call signature, but not between call signatures.
- Return type:
type expression